code: def get_git_repo(repo_path):
      # WARN: GitPython asserts the existence of `git` executable
      # which consists in failure during the preparation of conda package
      try:
          import git
  
          return git.Repo(repo_path, search_parent_directories=True)
      except ImportError:
          warnings.warn("GitPython could not be initialized")
  
file_path: neptune-client/src/neptune/internal/utils/git.py
imports: import logging
  import warnings
  from dataclasses import dataclass
  from datetime import datetime
  from typing import TYPE_CHECKING, List, Optional, Union
  from neptune.attributes.constants import DIFF_HEAD_INDEX_PATH, UPSTREAM_INDEX_DIFF
  from neptune.types import File
  from neptune.types.atoms.git_ref import GitRef, GitRefDisabled
label_desc: Use image node_id 1 for calling a global function with example usage: get_git_repo(repo_path) and returns: git