code: def _get_all_objs_of_type(type_, parent):
      
      return set([obj for obj in parent.__dict__.values()
                  if isinstance(obj, type_)])
docs: Get all attributes of the given type from the given object.
  
      Parameters
      ----------
      type_ : The desired type
      parent : The object from which to get the attributes with type matching
          'type_'
  
      Returns
      -------
      A list (possibly empty) of attributes from 'parent'