code: def setup(cfg):
      
  
      # copy the necessary configuration values over
      this_module = sys.modules[__name__]
      for name, value in cfg.items():
          if hasattr(this_module, name):
              setattr(this_module, name, value)
docs: set up the global configuration from an object