code: def test_git_run_context_caching(patch_script_name):
      """Check that the git commit hash is only looked up once."""
  
      with mock.patch("git.Repo") as mock_repo:
          context = GitRunContext()
          context.in_context()
          context.tags()
  
      mock_repo.assert_called_once()
  
file_path: mlflow/tests/tracking/context/test_git_context.py
imports: from unittest import mock
  import git
  import pytest
  from mlflow.tracking.context.git_context import GitRunContext
  from mlflow.utils.mlflow_tags import MLFLOW_GIT_COMMIT
label_desc: Use image node_id 6 for calling a global function with example usage: test_git_run_context_caching(patch_script_name) without return types