code: def get_branch_via_commit(repo):
      #  Should handle detached head
      c = list(repo.iter_commits())[0]
      branch_name = None
      for r in repo.refs:
          if r.object.hexsha == c.hexsha:
              branch_name = str(r)
      return branch_name
  
file_path: nptsne/tools/version_util.py
imports: from pathlib import Path
  import tempfile
  import os
  from git import Repo
label_desc: Use image node_id 2 for calling a global function with example usage: get_branch_via_commit(repo) and returns: branch_name