code: def _get_git_branch_and_commit() -> Tuple[str, str]:
      """Get a `(branch_name, commit_id)` tuple from the current direcory."""
      branch_name = "NO_BRANCH"
      commit = "NO_COMMIT"
      try:
          repo = Repo(__file__, search_parent_directories=True)
          try:
              branch_name = str(repo.active_branch)
          except TypeError:
              pass  # Keep current/default branch_name
          commit = str(repo.commit())
          if repo.is_dirty():
              commit += " + uncomitted changes"
      except InvalidGitRepositoryError:
          pass  # Keep current/default branch_name and commit
      return branch_name, commit
  
imports: import getpass
  import sys
  from dataclasses import asdict, dataclass, replace
  from datetime import datetime
  from pathlib import Path
  from platform import python_version
  from socket import gethostname
  from typing import Any, Mapping, Sequence, Tuple
  import numpy
  import psutil
  import tensorflow
  from cpuinfo import get_cpu_info
  from git.exc import InvalidGitRepositoryError
  from git.repo import Repo
  from tensorflow.python.client import device_lib
label_desc: Use image node_id 5 for calling a global function with example usage: _get_git_branch_and_commit() and returns: branch_name,  commit