code: def get_attribute(self, obj, attr):
          
          # '*' is a special wildcard character that means whole object
          # is passed
          if attr == '*':
              return obj
  
          # if this is any mapping then instead of attributes use keys
          if isinstance(obj, Mapping):
              return obj.get(attr, None)
  
          return getattr(obj, attr, None)
docs: Get attribute of given object instance.
  
          Reason for existence of this method is the fact that  'attribute' can
          be also object's key from if is a dict or any other kind of mapping.
  
          Note: it will return None if attribute key does not exist
  
          Args:
              obj (object): internal object to retrieve data from
  
          Returns:
              internal object's key value or attribute