code: def all_bases (type):
      
      assert isinstance(type, basestring)
      result = []
      while type:
          result.append (type)
          type = __types [type]['base']
  
      return result
docs: Returns type and all of its bases, in the order of their distance from type.