class_docstr: Operations with repos
class_docstr_tok: ["Operations","with","repos"]
code: def is_initialized(
      self,
      repo: Repo,
  ) -> bool:
      # """
      # Checks if the remote repo is initialized in the project
      #
      # Args:
      #     repo: repo to check
      #
      # Returns:
      #     repo is initialized
      # """
      try:
          self._api_client.repos.get(
              self._project, repo.repo_id, include_creds=False
          )
          return True
      except requests.exceptions.HTTPError as e:
          if e.response.status_code == 404:
              return False
          raise
  
file_path: dstack/src/dstack/api/_public/repos.py
imports: from pathlib import Path
  from typing import Optional, Union
  import giturlparse
  import requests
  from git import InvalidGitRepositoryError
  from dstack._internal.core.errors import ConfigurationError
  from dstack._internal.core.models.repos import LocalRepo, RemoteRepo
  from dstack._internal.core.models.repos.base import Repo, RepoType
  from dstack._internal.core.services.configs import ConfigManager
  from dstack._internal.core.services.repos import InvalidRepoCredentialsError, get_local_repo_credentials, load_repo
  from dstack._internal.utils.crypto import generate_rsa_key_pair
  from dstack._internal.utils.logging import get_logger
  from dstack._internal.utils.path import PathLike
  from dstack.api.server import APIClient
label_desc: Use image node_id 3 for calling the RepoCollection obj's underlying member method code with example usage: obj.is_initialized(repo) and returns: True, False