Extract tags from the given object

        :param Any obj: Object to use as context
        :return: Tags to add on span
        :rtype: dict
497318
def extract_tags(cls, obj):
        
        return dict(
            [("request.{}".format(attr), obj.get(attr, None)) for attr in
             cls.TAGS]
        )
932365
def tag2id(self, xs):
        
        if isinstance(xs, list):
            return [self._tag2id.get(x, self.UNK) for x in xs]
        return self._tag2id.get(xs, self.UNK)
654992
def match(self, obj, attrs):
        
        if '__doc__' in attrs:
            lstrip = getattr(obj.__doc__, 'lstrip', False)
            return lstrip and any(lstrip())
843569
def tag_dict(obj, *args, **kwargs):
    """"""

    if isinstance(obj, OrderedDict):
        return _TaggedOrderedDict(obj, *args, **kwargs)
    else:
        return _TaggedPlainDict(obj, *args, **kwargs)
1184528
def inject(cls, span, obj):
        
        opentracing.tracer.inject(span, cls.FORMAT, obj['headers'])
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
452645
def from_any(cls, obj, bucket):
        
        if isinstance(obj, cls):
            return cls(obj.raw)

        return cls({
            'namespace_id': 'default',
            'keyspace_id': bucket,
            'name': obj if obj else N1QL_PRIMARY_INDEX,
            'using': 'gsi'
        })
57045
def _make_string(self, objects: List[Any]) -> Text:
        

        return ''.join(x.__class__.__name__ + ',' for x in objects)
1102682
def _handle_tag_definetext(self):
        """"""
        obj = _make_object("DefineText")
        self._generic_definetext_parser(obj, self._get_struct_rgb)
        return obj
988719
def _find_any_text(self, tag):
        
        text = ''
        if tag is not None:
            text = six.text_type(tag)
            text = re.sub(r'(<[^>]+>)', '', text)
            text = re.sub(r'\s', ' ', text)
            text = text.strip()
        return text
366837
def detect_spans(self, tokens):
        
        candidates = self._get_candidates(tokens)
        results = self._filter_candidates(tokens, candidates)
        return results
1029290
def get_for_model(self, obj):
        """"""
        qs = Tag.objects.language(get_language())
        qs = qs.filter(
            tagged_items__content_type=ctype_models.ContentType.objects.get_for_model(obj))  # NOQA
        return qs.distinct()
528767
def label_from_instance(self, obj):
        
        label = smart_text(obj)
        prefix = self.level_indicator * getattr(obj, obj._mptt_meta.level_attr)
        if prefix:
            return '%s %s' % (prefix, label)
        return label
608996
def inject(cls, span, obj):
        
        obj.metadata['__parent-span__'] = dict()
        cls.inject_span(span, obj.metadata['__parent-span__'])
830147
def extract_objects_from_source(self, text, type_filter=None):
    '''
    '''
    objects = parse_verilog(text)

    if type_filter:
      objects = [o for o in objects if isinstance(o, type_filter)]

    return objects
4156
def extract(self, obj, bypass_ref=False):
        
        for token in self.tokens:
            obj = token.extract(obj, bypass_ref)
        return obj
502684
def _get_previous_open_tag(self, obj):
        
        prev_instance = self.get_previous_instance(obj)
        if prev_instance and prev_instance.plugin_type == self.__class__.__name__:
            return prev_instance.glossary.get('open_tag')