code: def make_launcher_archive(*, git_root_path, log_dir):
      """Saves an archive of the launcher's git repo to the log directory.
  
      Args:
          git_root_path (str): Absolute path to git repo to archive.
          log_dir (str): Absolute path to the log directory.
  
      """
      git_files = subprocess.check_output(
          (
              "git",
              "ls-files",
              "--others",
              "--exclude-standard",
              "--cached",
              "-z",
          ),
          cwd=git_root_path,
      ).strip()
      repo_size = 0
      files_to_archive = []
      for f in git_files.split(b"\0"):
          try:
              file_size = os.stat(
                  os.path.join(git_root_path, f)
              ).st_size
              repo_size += file_size
              if file_size < EIGHT_MEBIBYTES:
                  files_to_archive.append(f)
          except FileNotFoundError:
              pass
      if repo_size >= EIGHT_MEBIBYTES:
          warnings.warn(
              "Archiving a launch repo larger than 8MiB. This may be "
              "slow. Set archive_launch_repo=False in wrap_experiment "
              "to disable this behavior."
          )
      archive_path = os.path.join(log_dir, "launch_archive.tar.xz")
      subprocess.run(
          (
              "tar",
              "--null",
              "--files-from",
              "-",
              "--xz",
              "--create",
              "--file",
              archive_path,
          ),
          input=b"\0".join(files_to_archive),
          cwd=git_root_path,
          check=True,
      )
  
imports: import collections
  import datetime
  import enum
  import functools
  import gc
  import inspect
  import json
  import os
  import pathlib
  import subprocess
  import warnings
  import weakref
  import dateutil.tz
  import dowel
  from dowel import logger
  import numpy
  import __main__
label_desc: Use image node_id 6 for calling a global function with example usage: make_launcher_archive() without return types