code: def save_repo_config(
      self,
      repo_path: PathLike,
      repo_id: str,
      repo_type: RepoType,
      ssh_key_path: PathLike,
  ):
      self.config_filepath.parent.mkdir(parents=True, exist_ok=True)
      with filelock.FileLock(str(self.config_filepath) + ".lock"):
          self.load()
          repo_path = os.path.abspath(repo_path)
          ssh_key_path = os.path.abspath(ssh_key_path)
          for repo in self.config.repos:
              if repo.path == repo_path:
                  repo.repo_id = repo_id
                  repo.repo_type = repo_type
                  repo.ssh_key_path = ssh_key_path
                  break
          else:
              self.config.repos.append(
                  RepoConfig(
                      path=repo_path,
                      repo_id=repo_id,
                      repo_type=repo_type,
                      ssh_key_path=ssh_key_path,
                  )
              )
          self.save()
  
imports: import json
  import os.path
  from pathlib import Path
  from typing import Optional
  import filelock
  import yaml
  from pydantic import ValidationError
  from rich import print
  from rich.prompt import Confirm
  from dstack._internal.cli.utils.common import colors, confirm_ask
  from dstack._internal.core.models.config import GlobalConfig, ProjectConfig, RepoConfig
  from dstack._internal.core.models.repos.base import RepoType
  from dstack._internal.utils.common import get_dstack_dir
  from dstack._internal.utils.path import PathLike
label_desc: Use image node_id 7 for calling the ConfigManager obj's underlying member method code with example usage: obj.save_repo_config(repo_path, repo_id, repo_type, ssh_key_path) without return types