code: def main(argv: Sequence[str]):
      parser = argparse.ArgumentParser(
          description="Check `git diff` for prohibited regexes."
      )
      parser.add_argument("--path_regex", nargs="*", default=[])
      parser.add_argument(
          "--path_regex_exclusion", nargs="*", default=[]
      )
      parser.add_argument("--prohibited_regex", required=True)
      parser.add_argument("--suppression_regex")
      parser.add_argument("--failure_message", required=True)
  
      # We don't want to include path/to/check_contents.py as an argument
      args = parser.parse_args(argv[1:])
  
      file_diffs = filter_hunks_by_path(
          diff_parser.parse_hunks(diff_parser.get_git_diff_stdout()),
          path_regexes=args.path_regex,
          path_regex_exclusions=args.path_regex_exclusion,
      )
  
      regex_locations = check_diffs(
          file_diffs,
          prohibited_regex=args.prohibited_regex,
          suppression_regex=args.suppression_regex,
      )
  
      if regex_locations:
          for loc in regex_locations:
              logging.error(
                  "Found `%s` in %s:%s",
                  args.prohibited_regex,
                  loc.path,
                  loc.line_number,
              )
              logging.error(
                  "Matched `%s` in line `%s`",
                  loc.matched_text,
                  loc.line_contents,
              )
              logging.error("Failure message: %s", args.failure_message)
          sys.exit(1)
      else:
          logging.info(
              "Prohibited regex `%s` not found in diff!",
              args.prohibited_regex,
          )
          sys.exit(0)
  
file_path: tensorflow-upstream/third_party/xla/build_tools/lint/check_contents.py
imports: import argparse
  import dataclasses
  import logging
  import re
  import sys
  from typing import Iterable, Sequence
  from xla.build_tools.lint import diff_parser
label_desc: Use image node_id 3 for calling a global function with example usage: main(argv) without return types