code: def resolve_attribute(name, bases, default=None):
      
      for base in bases:
          if hasattr(base, name):
              return getattr(base, name)
      return default
docs: Find the first definition of an attribute according to MRO order.