code: def check_with_mode(op, args, kwargs, assert_equal_fn):
      CCT, cct_mode = generate_cct_and_mode()
  
      def wrap(e):
          return CCT(e, cct_mode) if isinstance(e, torch.Tensor) else e
  
      expected = op(*args, **kwargs)
  
      args = tree_map(wrap, args)
      kwargs = tree_map(wrap, kwargs)
      try:
          with cct_mode:
              actual = op(*args, **kwargs)
      # see NOTE: [What errors are Composite Compliance trying to catch?]
      except RuntimeError as err:
          raise_composite_compliance_error(err)
  
      def unwrap(e):
          return e.elem if isinstance(e, CCT) else e
  
      assert_equal_fn(tree_map(unwrap, actual), expected)
  
imports: import torch
  from torch import Tensor
  import itertools
  from torch.utils._python_dispatch import TorchDispatchMode
  from torch.utils._pytree import tree_map, tree_flatten, tree_unflatten
  from torch.utils import _pytree
  from functools import partial
  from torch.utils._mode_utils import no_dispatch, all_same_mode
  import torch.autograd.forward_ad
  from typing import Callable
  import re
label_desc: Use image node_id 14 for calling a global function with example usage: check_with_mode(op, args, kwargs, assert_equal_fn) and returns: unknown, unknown