code: def get_parents(obj, **kwargs):
      
      num_of_mro = kwargs.get("num_of_mro", 5)
  
      mro = getmro(obj.__class__)
      mro_string = ', '.join([extract_type(str(t)) for t in mro[:num_of_mro]])
  
      return "Hierarchy: {}".format(mro_string)
docs: Return the MRO of an object. Do regex on each element to remove the "<class..." bit.