code: def get_conf_from_module(mod):
      
  
      conf = ModuleConfig(CONF_SPEC)
  
      # get imported module
      mod = _get_correct_module(mod)
  
      conf.set_module(mod)
  
      # extarct from default object or from module
      if hasattr(mod, 'default'):
          default = mod.default
          conf = extract_conf_from(default, conf)
      else:
          conf = extract_conf_from(mod, conf)
      return conf
docs: return configuration from module with defaults no worry about None type