code: def load_settings(cfg_path=None):
      
  
      global settings
  
      cfg_path = cfg_path or _config['cfg_path']
  
      cfg_d = _config.copy()
  
      if os.path.exists(cfg_path):
          sfl = SourceFileLoader('upkg_cfg', cfg_path)
          cfg_mod = sfl.load_module()
  
          for m in inspect.getmembers(cfg_mod):
              if m[0][0] != '_':
                  cfg_d[m[0]] = m[1]
          # end for m in inspect.getme
  
      # Make the paths absolute.
      cfg_d["cfg_path"] = _clean_path(cfg_d["cfg_path"])
      cfg_d["upkg_destdir"] = _clean_path(cfg_d["upkg_destdir"])
  
      settings = Namespace(**cfg_d)
docs: todo: Docstring for load_settings
  
      :param cfg_path: arg description
      :type cfg_path: type description
      :return:
      :rtype: