class_docstr: For a given test, OpCheckMode intercepts calls to operators and runs
  test_util(op, args, kwargs) for each intercepted (op, args, kwargs).
code: def __init__(
      self,
      namespaces: List[str],
      test_util_name: str,
      test_util: Callable,
      failures_dict: "FailuresDict",
      test_name: str,
      failures_dict_path: str,
  ):
      # We will intercept calls to ops with these namespaces
      self.namespaces = namespaces
      # The test utility function. Its signature should be (op, args, kwargs) -> None.
      # Examples of test utilities are: schema_check, make_fx_check
      self.test_util = test_util
      self.test_util_name = test_util_name
      # The name of the test that is running this OpCheckMode.
      self.test_name = test_name
      # Maps qualname -> test_name -> skip/xfail
      # Tells us if we should skip a test or assert that there is a failure.
      self.failures_dict = failures_dict
      # Location of the failures dict. Makes it so that the error message is better.
      self.failures_dict_path = failures_dict_path
  
      # OpCheckMode surpresses errors, collects them here, and then raises them on exit.
      # Maps qualname -> List[(Exception, func, maybe args, maybe kwargs)]
      self.seen_ops_to_errors = {}
  
imports: import datetime
  import difflib
  import functools
  import inspect
  import json
  import os
  import re
  import tempfile
  import threading
  import unittest
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import torch
  import torch._dynamo
  import torch.utils._pytree
  from torch._dynamo.utils import clone_input
  from torch._subclasses.schema_check_mode import SchemaCheckMode
  from torch._utils_internal import get_file_path_2
  from torch.overrides import TorchFunctionMode
  from torch.testing._internal.optests import aot_autograd_check, autograd_registration_check, fake_check
label_desc: Use image node_id 1 to create a new OpCheckMode object from inherited base classes: TorchFunctionMode with example: obj = OpCheckMode(namespaces, test_util_name, test_util, failures_dict, test_name, failures_dict_path)