code: def main(data: str):
      print("Checking files for the pytest snippet...")
      parsed_data = parse_json(data)
      paths = get_paths_from_parsed_data(parsed_data)
  
      bad_paths = []
      for name, path in paths:
          # Special case for myst doc checker
          if "test_myst_doc" in str(path):
              continue
  
          print(f"Checking test '{name}' | file '{path}'...")
          try:
              with open(path, "r") as f:
                  if not check_file(f.read()):
                      print(
                          f"File '{path}' is missing the pytest snippet."
                      )
                      bad_paths.append(path)
          except FileNotFoundError:
              print(f"File '{path}' is missing.")
              bad_paths.append((path, "path is missing!"))
      if bad_paths:
          formatted_bad_paths = "\n".join([str(x) for x in bad_paths])
          raise RuntimeError(
              'Found py_test files without `if __name__ == "__main__":` snippet:'
              f"\n{formatted_bad_paths}\n"
              "If this is intentional, please add a `no_main` tag to bazel BUILD "
              "entry for those files."
          )
  
file_path: ray/ci/lint/pytest_checker.py
imports: import json
  import re
  import sys
  from pathlib import Path
label_desc: Use image node_id 5 for calling a global function with example usage: main(data) without return types