code: def load_and_migrate() -> Dict[str, Path]:
      
      if IS_ROBOT:
          _migrate_robot()
      base = infer_config_base_dir()
      base.mkdir(parents=True, exist_ok=True)
      index = _load_with_overrides(base)
      return _ensure_paths_and_types(index)
docs: Ensure the settings directory tree is properly configured.
  
      This function does most of its work on the actual robot. It will move
      all settings files from wherever they happen to be to the proper
      place. On non-robots, this mostly just loads. In addition, it writes
      a default config and makes sure all directories required exist (though
      the files in them may not).