code: def test_getting_git_info(self, mock_repo):
      # given
      now = datetime.datetime.now()
      repo = mock_repo.return_value
      repo.is_dirty.return_value = True
      repo.head.commit.hexsha = "sha"
      repo.head.commit.message = "message"
      repo.head.commit.author.name = "author_name"
      repo.head.commit.author.email = "author@email"
      repo.head.commit.committed_datetime = now
      repo.active_branch.name = "master"
      repo.remotes = []
  
      # when
      git_info = to_git_info(GitRef("."))
  
      # then
      assert git_info == GitInfo(
          commit_id="sha",
          message="message",
          author_name="author_name",
          author_email="author@email",
          commit_date=now,
          dirty=True,
          branch="master",
          remotes=[],
      )
  
imports: import datetime
  import git
  from git import Repo
  from mock import MagicMock, patch
  from neptune.internal.utils.git import GitInfo, get_diff, get_relevant_upstream_commit, get_repo_from_git_ref, get_uncommitted_changes, get_upstream_index_sha, search_for_most_recent_ancestor, to_git_info, track_uncommitted_changes
  from neptune.types import GitRef
label_desc: Use image node_id 2 for calling the TestGit obj's underlying member method code with example usage: obj.test_getting_git_info(mock_repo) without return types