code: def check_bc(existing_schemas):
      new_schema_dict = load_schemas_to_dict()
      version_map = process_version_map(
          torch._C._get_operator_version_map()
      )
      is_bc = True
      broken_ops = []
      for existing_schema in existing_schemas:
          if allow_listed(existing_schema):
              print(
                  "schema: ",
                  str(existing_schema),
                  " found on allowlist, skipping",
              )
              continue
          if has_valid_upgraders(existing_schema, version_map):
              print(
                  "schema: ",
                  str(existing_schema),
                  " has valid upgrader, skipping",
              )
              continue
          print("processing existing schema: ", str(existing_schema))
          matching_new_schemas = new_schema_dict.get(
              existing_schema.name, []
          )
          found = False
          for matching_new_schema in matching_new_schemas:
              if matching_new_schema.is_backward_compatible_with(
                  existing_schema
              ):
                  found = True
                  break
          if not found:
              print(
                  "Can NOT find backward compatible schemas after changes "
                  "for schema {} from the following candidates:\n[\n{}\n]".format(
                      str(existing_schema),
                      "\n\t".join(str(s) for s in matching_new_schemas),
                  )
              )
              # TODO Print out more details about why candidates don't match.
              broken_ops.append(str(existing_schema))
              is_bc = False
      if is_bc:
          print(
              "Found backward compatible schemas for all existing schemas"
          )
      else:
          print(
              "The PR is introducing backward incompatible changes to the "
              "operator library. Please contact PyTorch team to confirm "
              "whether this change is wanted or not. \n\nBroken ops: "
              "[\n\t{}\n]".format("\n\t".join(broken_ops))
          )
      return is_bc
  
file_path: pytorch/test/forward_backward_compatibility/check_forward_backward_compatibility.py
imports: import argparse
  import datetime
  import re
  import sys
  import warnings
  from collections import defaultdict
  import torch
  from torch._C import parse_schema
label_desc: Use image node_id 6 for calling a global function with example usage: check_bc(existing_schemas) and returns: is_bc