Returns the bundle to get the alias view from.
        If 'self.bundle_attr' is set, that bundle that it points to
        will be returned, otherwise the current_bundle will be
        returned.
421419
def get_bundle(self, current_bundle, url_kwargs, context_kwargs):
        
        if self.bundle_attr:
            if self.bundle_attr == PARENT:
                return current_bundle.parent

            view, name = current_bundle.get_view_and_name(self.bundle_attr)
            return view

        return current_bundle
987590
def path(self):
        

        # Need to do this to ensure the function produces the
        # bundle path when called from subclasses
        names = [k for k, _, _ in Name._name_parts]

        return os.path.join(self.source,
                            self._path_join(names=names, excludes=['source', 'format'], sep=self.NAME_PART_SEP),
                            *self._local_parts()
                            )
1301484
private static Method getNewGetBundleMethod() {

        Class   clazz;
        Class[] args;

        clazz = ResourceBundle.class;
        args  = new Class[] {
            String.class, Locale.class, ClassLoader.class
        };

        try {
            return clazz.getMethod("getBundle", args);
        } catch (Exception e) {
            return null;
        }
    }
145055
def get_policy_name_from_bundle(bundle)
      policy_name = nil
      policy_name ||= bundle.runlist_policy.policy_name if bundle.respond_to?(:runlist_policy) && bundle.runlist_policy
      policy_name
    end
900503
protected function bundle(): string
    {
        if (!$this->bundle)
        {
            $this->bundle = $this->request->getAttribute('bundle');

            if (!$this->bundle)
            {
                throw new Runtime('Bundle `name` is empty');
            }
        }

        return $this->bundle;
    }
645500
def bundle_visualization(self, bundle_id, channel=None):
        '''
        '''
        url = self.bundle_visualization_url(bundle_id, channel=channel)
        response = self._get(url)
        return response.content
57581
function getBundleId() {
  if (bundleId === undefined) {
    var configXmlHelper = new ConfigXmlHelper(context);
    bundleId = configXmlHelper.getPackageName('ios');
  }

  return bundleId;
}
374875
def get_bundles(self):
        # type: () -> List[Bundle]
        
        with self.__bundles_lock:
            return [
                self.__bundles[bundle_id]
                for bundle_id in sorted(self.__bundles.keys())
            ]
1157160
public function getBundle(AbstractBundle $bundle, $default = false)
    {
        if ($default) {
            return $bundle;
        }
        $query = $this->getNewQuery();
        $query = $bundle->makeQueryFiltered($query);
        $settings = $query->pluck('value', 'name');
        $bundle->setEnableSetter(false);
        $bundle->load($settings);
        $bundle->setEnableSetter(true);
        return $bundle;
    }
763467
def get_tags(self, view_object=None):
        
        tags = [force_unicode(self.bundle.get_title())]
        back_bundle = self.get_back_bundle()
        if back_bundle and back_bundle != self.bundle:
            tags.append(force_unicode(back_bundle.get_title()))
        if view_object:
            tags.append(force_unicode(view_object))

        return tags
539153
public Bundle getBundle(String symbolicName) {
		final String sourceMethod = "getBundle"; //$NON-NLS-1$
		boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(FrameworkWiringBundleResolver.class.getName(), sourceMethod, new Object[]{symbolicName});
		}
		Bundle[] candidates = Platform.getBundles(symbolicName, null);
		if (isTraceLogging) {
			log.finer("candidate bundles = " + Arrays.toString(candidates)); //$NON-NLS-1$
		}
		if (candidates == null || candidates.length == 0) {
			if (isTraceLogging) {
				log.exiting(FrameworkWiringBundleResolver.class.getName(), sourceMethod, null);
			}
			return null;
		}
		if (candidates.length == 1) {
			// Only one choice, so return it
			if (isTraceLogging) {
				log.exiting(FrameworkWiringBundleResolver.class.getName(), sourceMethod, candidates[0]);
			}
			return candidates[0];
		}
		if (fw == null) {
			if (isTraceLogging) {
				log.finer("Framework wiring not available.  Returning bundle with latest version"); //$NON-NLS-1$
				log.exiting(FrameworkWiringBundleResolver.class.getName(), sourceMethod, candidates[0]);
			}
			return candidates[0];
		}
		Bundle result = null;
		// For each candidate bundle, check to see if it's wired, directly or indirectly, to the contributing bundle
		for (Bundle candidate : candidates) {
			Collection<Bundle> bundles = fw.getDependencyClosure(Arrays.asList(new Bundle[]{candidate}));
			for (Bundle bundle : bundles) {
				if (bundle.equals(contributingBundle)) {
					// found wired bundle.  Return the candidate.
					result = candidate;
					break;
				}
			}
			if (result != null) {
				break;
			}
		}
		if (result == null) {
			if (isTraceLogging) {
				log.finer("No wired bundle found amoung candidates.  Returning bundle with most recent version."); //$NON-NLS-1$
			}
			result =  candidates[0];
		}
		if (isTraceLogging) {
			log.exiting(FrameworkWiringBundleResolver.class.getName(), sourceMethod, result);
		}
		return result;
	}
677613
def get(cls, name=None):
        
        if name is None:
            name = cls._default_depot

        name = cls.resolve_alias(name)  # resolve alias
        return cls._depots.get(name)
1266420
def _load_bundle_factories(bundle):
    # type: (Bundle) -> List[Tuple[FactoryContext, type]]
    
    result = []

    # Get the Python module
    module_ = bundle.get_module()

    # Get the bundle context
    bundle_context = bundle.get_bundle_context()

    for name in dir(module_):
        try:
            # Get the module member
            factory_class = getattr(module_, name)
            if not inspect.isclass(factory_class):
                continue

            # Check if it is a class
            if sys.modules[factory_class.__module__] is not module_:
                # Only keep classes from this module
                continue
        except (AttributeError, KeyError):
            # getattr() didn't work or __module__ is not a member of the class,
            # or the module is not known by the interpreter
            continue

        context = _set_factory_context(factory_class, bundle_context)
        if context is None:
            # Error setting up the factory context
            continue

        result.append((context, factory_class))

    return result
276830
def bundle(self, bundle_id, channel=None):
        '''
        '''
        return self.entity(bundle_id, get_files=True, channel=channel)
272751
def get_bundle(self, bundle_name, extensions=None):
        
        if self.stats.get('status') == 'done':
            bundle = self.stats.get('chunks', {}).get(bundle_name, None)
            if bundle is None:
                raise KeyError('No such bundle {0!r}.'.format(bundle_name))
            test = self._chunk_filter(extensions)
            return [self._add_url(c) for c in bundle if test(c)]
        elif self.stats.get('status') == 'error':
            raise RuntimeError("{error}: {message}".format(**self.stats))
        else:
            raise RuntimeError(
                "Bad webpack stats file {0} status: {1!r}"
                .format(self.state.stats_file, self.stats.get('status')))
376252
@ManyToOne(targetEntity = org.openprovenance.prov.sql.QualifiedName.class, cascade = {
        CascadeType.ALL
    })
    @JoinColumn(name = "BUNDLE")
    public org.openprovenance.prov.model.QualifiedName getBundle() {
        return bundle;
    }
998288
def index_bundle(self, bundle, force=False):
        
        from ambry.orm.dataset import Dataset

        dataset = bundle if isinstance(bundle, Dataset) else bundle.dataset

        self.index_dataset(dataset, force)

        for partition in dataset.partitions:
            self.index_partition(partition, force)