:param dict context:
          keys that were missing in the static context given in
          constructor to resolve the butcket name.
178893
def uri(self, context=None):
        
        if context is None:
            context = self.context
        else:
            ctx = copy.deepcopy(self.context)
            ctx.update(context)
            context = ctx
        return self.uri_format.format(**context)
66695
def import_context(cls, context):
		
		if context is None or len(context) == 0:
			return

		result = WContext(context[0][0], context[0][1])
		for iter_context in context[1:]:
			result = WContext(iter_context[0], context_value=iter_context[1], linked_context=result)
		return result
343797
def set_context(context):
    """"""
    global _context
    _context = {k: v for k, v in context.items()}
1315251
def get_context_data(self, **kwargs):
        
        context = super(BaseEntryChannel, self).get_context_data(**kwargs)
        context.update({'query': self.query})
        return context
1133527
def init_with_context(self, context):
        
        items = self._visible_models(context['request'])
        apps = {}
        for model, perms in items:
            if not (perms['change'] or perms.get('view', False)):
                continue
            app_label = model._meta.app_label
            if app_label not in apps:
                apps[app_label] = {
                    'title':
                        django_apps.get_app_config(app_label).verbose_name,
                    'url': self._get_admin_app_list_url(model, context),
                    'models': []
                }
            apps[app_label]['models'].append({
                'title': model._meta.verbose_name_plural,
                'url': self._get_admin_change_url(model, context)
            })

        for app in sorted(apps.keys()):
            app_dict = apps[app]
            item = MenuItem(title=app_dict['title'], url=app_dict['url'])
            # sort model list alphabetically
            apps[app]['models'].sort(key=lambda x: x['title'])
            for model_dict in apps[app]['models']:
                item.children.append(MenuItem(**model_dict))
            self.children.append(item)
1324898
def context(self, identifier=None, meta=None):
        
        return Context(self, identifier=identifier, meta=meta)
443607
def get_context_tags(self):
        
        self.assert_open()
        if self.has_context_tags:
            tags = self.handle[self.global_key + 'context_tags'].attrs.items()
            return {key: _clean(value) for key, value in tags}
        return {}
827650
def inject_context(self, __context_dict__=None, **context):
        
        context = context or __context_dict__
        self.context_keys |= set(context.keys())
        for key, value in context.items():
            setattr(self, key, value)
        for command in self.subcommands.values():
            command.inject_context(context)
626334
def ensure_context_attribute_exists(context, name, default_value=None):
    
    if not hasattr(context, name):
        setattr(context, name, default_value)
559975
def init_with_context(self, context):
        
        items = self._visible_models(context['request'])
        for model, perms in items:
            if not (perms['change'] or perms.get('view', False)):
                continue
            title = model._meta.verbose_name_plural
            url = self._get_admin_change_url(model, context)
            item = MenuItem(title=title, url=url)
            self.children.append(item)
390346
def _prepare(cls, context: Dict) -> Dict:
        
        if not context and cls.raise_empty_context:
            raise PolyaxonActionException('{} received invalid payload context.'.format(cls.name))

        return context
837041
def get_context(self):
        "  "
        return {
                'content_type_name' : str(self.name),
                'content_type_verbose_name' : self.verbose_name,
                'content_type_verbose_name_plural' : self.verbose_name_plural,
                'object' : self.obj,
                'box' : self,
        }
313142
def get_context(self, name, value, attrs):
        """"""
        context = super().get_context(
            name, value, attrs)
        context['widget']['attrs']['dp_config'] = json_dumps(self.config)
        return context
5395
def get_parsed_context(context_arg):
    """"""
    assert context_arg, ("pipeline must be invoked with context arg set. For "
                         "this json parser you're looking for something "
                         "like: "
                         "pypyr pipelinename './myjsonfile.json'")
    logger.debug("starting")
    # open the json file on disk so that you can initialize the dictionary
    logger.debug(f"attempting to open file: {context_arg}")
    with open(context_arg) as json_file:
        payload = json.load(json_file)

    logger.debug(f"json file loaded into context. Count: {len(payload)}")
    logger.debug("done")
    return payload
114586
def init_with_context(self, context):
        
        site_name = get_admin_site_name(context)

        self.children += [
            items.MenuItem(_('Dashboard'), reverse('{0}:index'.format(site_name))),
            items.Bookmarks(),
        ]

        for title, kwargs in get_application_groups():
            if kwargs.get('enabled', True):
                self.children.append(CmsModelList(title, **kwargs))

        self.children += [
            ReturnToSiteItem()
        ]
507962
def _warn_key_unknown(cls, cls_context, key):
        

        context_name = cls_context.__name__
        warnings.warn(cls._WARNING_KEY_UNKNOWN.format(key, context_name))
479903
def get_context(self):
        
        if not self.context:
            return
        else:
            assert isinstance(self.context, tuple), 'Expected a Tuple not {0}'.format(type(self.context))
        for model in self.context:
            model_cls = utils.get_model_class(model)
            key = utils.camel_to_snake(model_cls.__name__)
            self.context_data[key] = self.get_instance_of(model_cls)