code: def from_namespace(cls, namespace):
          
          config = cls()
          for slot in cls.__slots__:
              if slot.startswith('_'):
                  slot = slot[1:]
              if not hasattr(namespace, slot):
                  continue
              setattr(config, slot, getattr(namespace, slot))
  
          return config
docs: Initialise from argparser Namespace object.