code: def is_under_version_control(path):
      command = ["git", "ls-files", "--error-unmatch", path]
      popen = subprocess.Popen(
          command,
          cwd=os.path.dirname(path),
          stdout=subprocess.PIPE,
          stderr=subprocess.PIPE,
      )
      popen.communicate()
      popen.wait()
      return popen.returncode == 0
  
file_path: gensim/docs/src/tools/check_gallery.py
imports: import argparse
  import os
  import os.path
  import re
  import sys
  import shlex
  import subprocess
label_desc: Use image node_id 2 for calling a global function with example usage: is_under_version_control(path) and returns: unknown