code: def _from_type(self, config):
          
          def is_user_attribute(attr):
              return (
                  not attr.startswith('__') and
                  not isinstance(getattr(config, attr), collections.abc.Callable)
              )
  
          return {attr: getattr(config, attr) for attr in dir(config) \
                                                      if is_user_attribute(attr)}
docs: This method converts a type into a dict.