code: def _migrate(data: Mapping[str, Any]) -> SettingsData:
      
      next = dict(data)
      version = next.pop('_version', 0)
      target_version = len(_MIGRATIONS)
      migrations = _MIGRATIONS[version:]
  
      if len(migrations) > 0:
          log.info(
              "Migrating advanced settings from version {} to {}"
              .format(version, target_version))
  
      for m in migrations:
          next = m(next)
  
      return next, target_version
docs: Check the version integer of the JSON file data a run any necessary
      migrations to get us to the latest file format. Returns dictionary of
      settings and version migrated to