code: 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
docs: Get baseclass names from the code object