code: def temporarily_write_git_hash(
      git_hash, filename=os.path.join("sockeye", "git_version.py")
  ):
      """Temporarily create a module git_version in sockeye so that it will be included when installing and packaging."""
      content = (
          """
  # This file is automatically generated in setup.py
  git_hash = "%s"
  """
          % git_hash
      )
      if os.path.exists(filename):
          raise RuntimeError(
              "%s already exists, will not overwrite" % filename
          )
      with open(filename, "w") as out:
          out.write(content)
      try:
          yield
      except:
          raise
      finally:
          os.remove(filename)
  
file_path: sockeye/setup.py
imports: import sys
  import os
  import re
  import logging
  import argparse
  import subprocess
  from setuptools import setup, find_packages
  from contextlib import contextmanager
label_desc: Use image node_id 4 for calling a global function with example usage: temporarily_write_git_hash(git_hash, filename) without return types