code: def test_is_under_git_control():
      with tempfile.TemporaryDirectory() as tmp:
          # Not under git control
          with work_dir(tmp):
              assert not pfrl.experiments.is_under_git_control()
  
          # Run: git init
          with work_dir(tmp):
              subprocess.call(["git", "init"])
  
          # Under git control
          with work_dir(tmp):
              assert pfrl.experiments.is_under_git_control()
  
file_path: pfrl/tests/experiments_tests/test_prepare_output_dir.py
imports: import contextlib
  import itertools
  import json
  import os
  import subprocess
  import sys
  import tempfile
  import pytest
  import pfrl
label_desc: Use image node_id 2 for calling a global function with example usage: test_is_under_git_control() without return types