code: def test_run_local_git_repo(
      local_git_repo, local_git_repo_uri, use_start_run, version
  ):
      if version is not None:
          uri = local_git_repo_uri + "#" + TEST_PROJECT_NAME
      else:
          uri = os.path.join(f"{local_git_repo}/", TEST_PROJECT_NAME)
      if version == "git-commit":
          version = _get_version_local_git_repo(local_git_repo)
      submitted_run = mlflow.projects.run(
          uri,
          entry_point="test_tracking",
          version=version,
          parameters={"use_start_run": use_start_run},
          env_manager="local",
          experiment_id=FileStore.DEFAULT_EXPERIMENT_ID,
      )
  
      # Blocking runs should be finished when they return
      validate_exit_status(
          submitted_run.get_status(), RunStatus.FINISHED
      )
      # Test that we can call wait() on a synchronous run & that the run has the correct
      # status after calling wait().
      submitted_run.wait()
      validate_exit_status(
          submitted_run.get_status(), RunStatus.FINISHED
      )
      # Validate run contents in the FileStore
      run_id = submitted_run.run_id
      mlflow_service = MlflowClient()
      runs = mlflow_service.search_runs(
          [FileStore.DEFAULT_EXPERIMENT_ID],
          run_view_type=ViewType.ACTIVE_ONLY,
      )
      assert len(runs) == 1
      store_run_id = runs[0].info.run_id
      assert run_id == store_run_id
      run = mlflow_service.get_run(run_id)
  
      assert run.info.status == RunStatus.to_string(RunStatus.FINISHED)
  
      assert run.data.params == {
          "use_start_run": use_start_run,
      }
      assert run.data.metrics == {"some_key": 3}
  
      tags = run.data.tags
      assert tags[MLFLOW_USER] == MOCK_USER
      assert "file:" in tags[MLFLOW_SOURCE_NAME]
      assert tags[MLFLOW_SOURCE_TYPE] == SourceType.to_string(
          SourceType.PROJECT
      )
      assert tags[MLFLOW_PROJECT_ENTRY_POINT] == "test_tracking"
      assert tags[MLFLOW_PROJECT_BACKEND] == "local"
  
      if version == "master":
          assert tags[MLFLOW_GIT_BRANCH] == "master"
          assert tags[MLFLOW_GIT_REPO_URL] == local_git_repo_uri
          assert tags[LEGACY_MLFLOW_GIT_BRANCH_NAME] == "master"
          assert tags[LEGACY_MLFLOW_GIT_REPO_URL] == local_git_repo_uri
  
imports: import json
  import os
  import shutil
  import subprocess
  import uuid
  from unittest import mock
  import git
  import pytest
  import yaml
  from databricks_cli.configure.provider import DatabricksConfig
  import mlflow
  from mlflow import MlflowClient
  from mlflow.entities import RunStatus, SourceType, ViewType
  from mlflow.environment_variables import MLFLOW_CONDA_CREATE_ENV_CMD, MLFLOW_CONDA_HOME
  from mlflow.exceptions import ExecutionException, MlflowException
  from mlflow.projects import _parse_kubernetes_config, _resolve_experiment_id
  from mlflow.store.tracking.file_store import FileStore
  from mlflow.utils import PYTHON_VERSION
  from mlflow.utils.conda import CONDA_EXE, get_or_create_conda_env
  from mlflow.utils.mlflow_tags import LEGACY_MLFLOW_GIT_BRANCH_NAME, LEGACY_MLFLOW_GIT_REPO_URL, MLFLOW_GIT_BRANCH, MLFLOW_GIT_REPO_URL, MLFLOW_PARENT_RUN_ID, MLFLOW_PROJECT_BACKEND, MLFLOW_PROJECT_ENTRY_POINT, MLFLOW_PROJECT_ENV, MLFLOW_SOURCE_NAME, MLFLOW_SOURCE_TYPE, MLFLOW_USER
  from mlflow.utils.process import ShellCommandException
  from tests.projects.utils import TEST_PROJECT_DIR, TEST_PROJECT_NAME, validate_exit_status
label_desc: Use image node_id 8 for calling a global function with example usage: test_run_local_git_repo(local_git_repo, local_git_repo_uri, use_start_run, version) without return types