code: def is_repo(d):
      """is d a git repo?"""
      return os.path.exists(os.path.join(d, ".git"))
  
imports: import os
  import subprocess
  import sys
  import warnings
  import shutil
label_desc: Use image node_id 2 for calling a global function with example usage: is_repo(d) and returns: os