See base class for details.
163295
def decode_example(self, tfexample_dict):
    """"""
    tensor_dict = {}
    # Iterate over the Tensor dict keys
    for feature_key, feature in six.iteritems(self._feature_dict):
      decoded_feature = decode_single_feature_from_dict(
          feature_k=feature_key,
          feature=feature,
          tfexample_dict=tfexample_dict,
      )
      tensor_dict[feature_key] = decoded_feature
    return tensor_dict
120105
def _get_base_class_names(frame):
    
    co, lasti = frame.f_code, frame.f_lasti
    code = co.co_code

    extends = []
    for (op, oparg) in op_stream(code, lasti):
        if op in dis.hasconst:
            if type(co.co_consts[oparg]) == str:
                extends = []
        elif op in dis.hasname:
            if dis.opname[op] == 'LOAD_NAME':
                extends.append(('name', co.co_names[oparg]))
            if dis.opname[op] == 'LOAD_ATTR':
                extends.append(('attr', co.co_names[oparg]))
            if dis.opname[op] == 'LOAD_GLOBAL':
                extends.append(('name', co.co_names[oparg]))

    items = []
    previous_item = []
    for t, s in extends:
        if t == 'name':
            if previous_item:
                items.append(previous_item)
            previous_item = [s]
        else:
            previous_item += [s]
    if previous_item:
        items.append(previous_item)
    return items
396005
def _filter_classes(cls_list, cls_type):
    """"""
    for cls in cls_list:
        if isinstance(cls, type) and issubclass(cls, cls_type):
            if cls_type == TempyPlace and cls._base_place:
                pass
            else:
                yield cls
873576
private boolean baseUsedInClass(Node n){
    for (Node curr = n; curr != null; curr = curr.getParent()){
      if (curr.isClassMembers()) {
        return true;
      }
    }
    return false;
  }
27902
def get_inheritors(cls):
    """"""
    subclasses = set()
    work = [cls]
    while work:
        parent = work.pop()
        for child in parent.__subclasses__():
            if child not in subclasses:
                subclasses.add(child)
                work.append(child)
    return subclasses
768516
def parent_class_name(obj)
      unless DEFAULT_PARENTS.include? obj.class.superclass
        return obj.class.base_class.name
      end

      obj.class.name
    end
956093
def load(cls, data):
        
        if len(data) == 1:
            for key, value in data.items():
                if "__classname__" not in value:  # pragma: no cover
                    raise ValueError
                name = key
                bases = (Constant,)
                attrs = dict()
                for k, v in value.items():
                    if isinstance(v, dict):
                        if "__classname__" in v:
                            attrs[k] = cls.load({k: v})
                        else:
                            attrs[k] = v
                    else:
                        attrs[k] = v
            return type(name, bases, attrs)
        else:  # pragma: no cover
            raise ValueError
606343
def visit_ClassDef(self, node):
        """"""
        # [[[cog
        # cog.out("print(pcolor('Enter class visitor', 'magenta'))")
        # ]]]
        # [[[end]]]
        # Get class information (name, line number, etc.)
        element_full_name = self._pop_indent_stack(node, "class")
        code_id = (self._fname, node.lineno)
        self._processed_line = node.lineno
        # Add class entry to dictionaries
        self._class_names.append(element_full_name)
        self._callables_db[element_full_name] = {
            "name": element_full_name,
            "type": "class",
            "code_id": code_id,
            "last_lineno": None,
        }
        self._reverse_callables_db[code_id] = element_full_name
        # [[[cog
        # code = """
        # print(
        #     pcolor(
        #         'Visiting class {0} @ {1}, indent = {2}'.format(
        #             element_full_name, code_id[1], self._get_indent(node)
        #         ),
        #         'green'
        #     )
        # )
        # """
        # cog.out(code)
        # ]]]
        # [[[end]]]
        self.generic_visit(node)
308727
def construct_exc_class(cls):
    """"""

    class ProxyException(cls, BaseException):
        __pep3134__ = True

        @property
        def __traceback__(self):
            if self.__fixed_traceback__:
                return self.__fixed_traceback__

            current_exc, current_tb = sys.exc_info()[1:]
            if current_exc is self:
                return current_tb

        def __init__(self, instance=None):  # pylint: disable=W0231
            self.__original_exception__ = instance
            self.__fixed_traceback__ = None

        def __getattr__(self, item):
            return getattr(self.__original_exception__, item)

        def __repr__(self):
            return repr(self.__original_exception__)

        def __str__(self):
            return str(self.__original_exception__)

        def with_traceback(self, traceback):
            instance = copy.copy(self)
            instance.__fixed_traceback__ = traceback
            return instance

    ProxyException.__name__ = cls.__name__

    return ProxyException
659131
def visit_ClassDef(self, node):
        """"""
        self.defined_types.add(node.name)

        bases = []
        for n in node.bases:
            base_parts = []
            while True:
                if not isinstance(n, ast.Attribute):
                    base_parts.append(n.id)
                    break
                else:
                    base_parts.append(n.attr)
                n = n.value
            bases.append(".".join(base_parts[::-1]))
        self.required_types |= set(bases)

        signature = get_signature(node)
        stub_node = ClassNode(node.name, bases=bases, signature=signature)
        self._parents[-1].add_child(stub_node)

        self._parents.append(stub_node)
        self.generic_visit(node)
        del self._parents[-1]
1326981
public void getBaseDataClass(FieldStuff fieldStuff)
    {
        Record recClassInfo2 = m_recClassInfo2;
        FieldData recFieldData = (FieldData)this.getRecord(FieldData.FIELD_DATA_FILE);
        
        String strRecordClass = recFieldData.getField(FieldData.FIELD_CLASS).getString();
        fieldStuff.strBaseFieldClass = null;
        try   {
            while (true)
            {
                recClassInfo2.setKeyArea(ClassInfo.CLASS_NAME_KEY);
                recClassInfo2.getField(ClassInfo.CLASS_NAME).setString(strRecordClass);   // Class of this record
                if ((!recClassInfo2.seek("=")) || (strRecordClass == null) || (strRecordClass.length() == 0))
                {
                    if (fieldStuff.strBaseFieldClass == null)
                        fieldStuff.strBaseFieldClass = recFieldData.getField(FieldData.FIELD_CLASS).getString();   // Never
                    return;
                }
                if (fieldStuff.strBaseFieldClass == null)
                {
                	String packageName = ((ClassInfo)recClassInfo2).getPackageName(null);
                    if (packageName.endsWith(".base.field"))
                        fieldStuff.strBaseFieldClass = recClassInfo2.getField(ClassInfo.CLASS_NAME).toString();
                }
                if (strRecordClass.indexOf("Field") != -1)
                {
                    String strType = strRecordClass.substring(0, strRecordClass.indexOf("Field"));
                    if ((strType.equals("DateTime")) || (strType.equals("Time")))
                        strType = "Date";
                    if (strType.length() > 0)
                        if ("Short Integer Double Float Boolean String Date".indexOf(strType) != -1)
                    {
                        if ((fieldStuff.strDataClass == null) || (fieldStuff.strDataClass.length() == 0))
                            fieldStuff.strDataClass = strType;      // End of based records - not found
                        return;
                    }
                }
                strRecordClass = recClassInfo2.getField(ClassInfo.BASE_CLASS_NAME).getString();
            }
        } catch (DBException ex)    {
            ex.printStackTrace();
        }
    }
56557
def _get_members(obj, traverse_bases=True, filter=default_filter,
                 recursive=True):
    """"""
    if filter is None:
        filter = _true

    out = []
    stack = collections.deque((obj,))
    while stack:
        obj = stack.popleft()
        if traverse_bases and isinstance(obj, _CLASS_TYPES):
            roots = [base for base in inspect.getmro(obj)
                     if base not in (type, object)]
        else:
            roots = [obj]

        members = []
        seen = set()
        for root in roots:
            for name, value in _iteritems(getattr(root, '__dict__', {})):
                if name not in seen and filter(name, value):
                    members.append((name, value))

                seen.add(name)

        members = sorted(members)
        for _, value in members:
            if recursive and isinstance(value, _CLASS_TYPES):
                stack.append(value)

        out.extend(members)

    return out
275292
def metaclasses(bases):
    ''' 
    '''
    ret = []
    metas = [type(base) for base in bases]
    for k,meta in enumerate(metas):
        if not any(issubclass(m, meta) for m in metas[k+1:]):
            ret.append(meta)

    if type in ret:
        ret.remove(type)
    return ret
974979
def walk_subclasses(root):
    """"""
    classes = [root]
    visited = set()
    while classes:
        cls = classes.pop()
        if cls is type or cls in visited:
            continue
        classes.extend(cls.__subclasses__())
        visited.add(cls)
        if cls is not root:
            yield cls
266435
def object_build_class(node, member, localname):
    """"""
    basenames = [base.__name__ for base in member.__bases__]
    return _base_class_object_build(node, member, basenames, localname=localname)
285806
def doit(self, classes=None, recursive=True, **kwargs):
        
        return super().doit(classes, recursive, **kwargs)
455989
def class_in_progress(stack=None):
    """"""
    if stack is None:
        stack = inspect.stack()
    for frame in stack:
        statement_list = frame[4]
        if statement_list is None:
            continue
        if statement_list[0].strip().startswith('class '):
            return True
    return False