code: def _init_git_ls_files_sample_project():
      """Initializes a sample project for git ls-files check.
  
      Project is an initialized Git repo consisting of:
  
        - subdirectory `files` containing a single file `foo.txt`
        - `.gitignore` containing a single line `*.txt`
  
      Returns the project directory.
      """
      project_dir = util.mktempdir("guild-check-")
      _ = subprocess.check_output(
          [_git_exe.read(), "init"], cwd=project_dir
      )
      os.mkdir(os.path.join(project_dir, "files"))
      util.touch(os.path.join(project_dir, "files", "foo.txt"))
      with open(os.path.join(project_dir, ".gitignore"), "w") as f:
          f.write("*.txt\n")
      return project_dir
  
imports: import collections
  import logging
  import re
  import os
  import subprocess
  from guild import config
  from guild import file_util
  from guild import util
  from guild.file_util import FileSelectRule
label_desc: Use image node_id 30 for calling a global function with example usage: _init_git_ls_files_sample_project() and returns: project_dir