code: def __init__(
      self,
      path=None,
      repo_branch=None,
      repo_commit=None,
      repo_full_path=None,
      mode=WRITING_MODE,
  ):
      self._config = {}
      path = clean_repo_path(path)
      self.path = repo_full_path or os.path.join(
          path, get_aim_repo_name()
      )
      self.config_path = os.path.join(self.path, AIM_CONFIG_FILE_NAME)
      self.hash = hashlib.md5(self.path.encode("utf-8")).hexdigest()
  
      self.active_commit = repo_commit or AIM_COMMIT_INDEX_DIR_NAME
      if re.match(r"^[A-Za-z0-9_\-]{2,}$", self.active_commit) is None:
          raise ValueError(
              "run name must be at least 2 characters "
              + "and contain only latin letters, numbers, "
              + "dash and underscore"
          )
  
      self.root_path = repo_full_path or path
      self.name = self.root_path.split(os.sep)[-1]
  
      self.branch_path = None
      self.index_path = None
      self.objects_dir_path = None
      self.media_dir_path = None
      self.records_storage = None
      self.mode = mode
  
      active_exp = self.config.get("active_branch")
  
      if repo_branch is not None:
          experiment = repo_branch
      elif active_exp is not None:
          experiment = active_exp
      else:
          experiment = None
  
      if experiment is not None:
          run_full_path = get_experiment_run_path(
              self.path, experiment, self.active_commit
          )
      else:
          run_full_path = None
  
      if (
          self.active_commit != AIM_COMMIT_INDEX_DIR_NAME
          and run_full_path
          and os.path.exists(run_full_path)
      ):
          raise ValueError(
              ("run `{}` already exists" + "").format(
                  self.active_commit
              )
          )
  
file_path: aim/aim/cli/upgrade/_legacy_repo/repo/repo.py
imports: import os
  import json
  import re
  import hashlib
  from aim.sdk.configs import get_aim_repo_name
  from aim.sdk.utils import clean_repo_path
  from aim.cli.upgrade._legacy_repo.repo.utils import get_experiment_run_path
  from aim.cli.upgrade._legacy_repo.configs import AIM_CONFIG_FILE_NAME, AIM_COMMIT_INDEX_DIR_NAME
label_desc: Use image node_id 1 to create a new AimRepo object  with example: obj = AimRepo(path, repo_branch, repo_commit, repo_full_path, mode)