code: def from_object(self, instance: Union[object, str]) -> None:
          
          if isinstance(instance, str):
              try:
                  path, config = instance.rsplit('.', 1)
              except ValueError:
                  path = instance
                  instance = importlib.import_module(path)
              else:
                  module = importlib.import_module(path)
                  instance = getattr(module, config)
  
          for key in dir(instance):
              if key.isupper():
                  self[key] = getattr(instance, key)
docs: Load the configuration from a Python object.
  
          This can be used to reference modules or objects within
          modules for example,
  
          .. code-block:: python
  
              app.config.from_object('module')
              app.config.from_object('module.instance')
              from module import instance
              app.config.from_object(instance)
  
          are valid.
  
          Arguments:
              instance: Either a str referencing a python object or the
                  object itself.