code: def test_wrap_experiment_builds_git_archive_large_file():
      prefix = "wrap_exp_test_builds_git_archive_large_files"
      exp_path = pathlib.Path(os.getcwd(), "data/local", prefix)
      _hard_rmtree(exp_path)
      expected_path = exp_path / "test_exp" / "launch_archive.tar.xz"
  
      # Because __main__ actually points to pytest right now, we need to run the
      # "real" test in a subprocess.
      with tempfile.TemporaryDirectory() as launcher_dir:
          launch_dir = pathlib.Path(launcher_dir)
          subprocess.check_call(("git", "init"), cwd=launcher_dir)
          # Make a test file, since git ls-files needs at least one commit.
          test_txt = launch_dir / "test.txt"
          test_txt.touch()
          subprocess.check_call(
              ("git", "add", str(test_txt)), cwd=launcher_dir
          )
          subprocess.check_call(
              (
                  "git",
                  "-c",
                  "user.name=Test User",
                  "-c",
                  "user.email=test@example.com",
                  "commit",
                  "-m",
                  "Initial commit",
              ),
              cwd=launcher_dir,
          )
          subdir = launch_dir / "subdir"
          subdir.mkdir()
          launcher_path = (
              pathlib.Path(launcher_dir) / "subdir" / "run_exp.py"
          )
  
          large_file = launch_dir / "large.obj"
          with open(large_file, "wb") as f:
              f.write(b"0" * int(1e7))
  
          snapshot_dir, output = _run_launcher(launcher_path, prefix)
  
          assert any(["archive_launch_repo" in line for line in output])
  
          archive_path = os.path.join(
              snapshot_dir, "launch_archive.tar.xz"
          )
          assert expected_path.samefile(archive_path)
          assert expected_path.exists()
          archive_size = expected_path.stat().st_size
          assert archive_size > 250
          contents = subprocess.check_output(
              ("tar", "--list", "--file", archive_path)
          ).decode("utf-8")
          assert "subdir/run_exp.py" in contents.strip()
          assert "test.txt" in contents.strip()
          assert "large.obj" not in contents.strip()
  
imports: import os
  import pathlib
  import shutil
  import subprocess
  import sys
  import tempfile
  import textwrap
  import pytest
  from garage.experiment.experiment import wrap_experiment
label_desc: Use image node_id 6 for calling a global function with example usage: test_wrap_experiment_builds_git_archive_large_file() without return types