code: def checkCopyright_main():
      """
      Checks for copyright headers in all the modified files. In case of local
      repo, this script will just look for uncommitted files and in case of CI
      it compares between branches "$PR_TARGET_BRANCH" and "current-pr-branch"
      """
      retVal = 0
  
      argparser = argparse.ArgumentParser(
          "Checks for a consistent copyright header in git's modified files"
      )
      argparser.add_argument(
          "--update-current-year",
          dest="update_current_year",
          action="store_true",
          required=False,
          help="If set, "
          "update the current year if a header is already "
          "present and well formatted.",
      )
      argparser.add_argument(
          "--git-modified-only",
          dest="git_modified_only",
          action="store_true",
          required=False,
          help="If set, "
          "only files seen as modified by git will be "
          "processed.",
      )
  
      args, dirs = argparser.parse_known_args()
  
      if args.git_modified_only:
          files = [f for f in modifiedFiles() if checkThisFile(f)]
      else:
          files = []
          for d in [os.path.abspath(d) for d in dirs]:
              if not os.path.isdir(d):
                  raise ValueError(f"{d} is not a directory.")
              files += getAllFilesUnderDir(d, pathFilter=checkThisFile)
  
      errors = []
      for f in files:
          errors += checkCopyright(f, args.update_current_year)
  
      if len(errors) > 0:
          if any(e[-1] is None for e in errors):
              print(
                  "Copyright headers incomplete in some of the files!"
              )
          for e in errors:
              print("  %s:%d Issue: %s" % (e[0], e[1], e[2]))
          print("")
          n_fixable = sum(1 for e in errors if e[-1] is not None)
          path_parts = os.path.abspath(__file__).split(os.sep)
          file_from_repo = os.sep.join(
              path_parts[path_parts.index("ci") :]
          )
          if n_fixable > 0 and not args.update_current_year:
              print(
                  f"You can run `python {file_from_repo} --git-modified-only "
                  "--update-current-year` and stage the results in git to "
                  f"fix {n_fixable} of these errors.\n"
              )
          retVal = 1
  
      return retVal
  
file_path: cugraph/ci/checks/copyright.py
imports: import argparse
  import datetime
  import os
  import re
  import sys
  import git
label_desc: Use image node_id 7 for calling a global function with example usage: checkCopyright_main() and returns: retVal