code: def deep_equal(x, y):
      """
      Deep comparison, assuming tensors will not be mutated.
      """
      if type(x) != type(y):
          return False
      if isinstance(x, (tuple, frozenset, set, numbers.Number)):
          return x == y
      if isinstance(x, torch.Tensor):
          return x is y
      if isinstance(x, list):
          if len(x) != len(y):
              return False
          return all((deep_equal(xi, yi) for xi, yi in zip(x, y)))
      if isinstance(x, (dict, OrderedDict)):
          if len(x) != len(y):
              return False
          if any(key not in y for key in x):
              return False
          return all(deep_equal(x[key], y[key]) for key in x)
      raise TypeError(type(x))
  
imports: import itertools
  import numbers
  from collections import OrderedDict
  import opt_einsum
  import pytest
  import torch
  import pyro.ops.jit
  from pyro.distributions.util import logsumexp
  from pyro.ops.contract import _partition_terms, contract_tensor_tree, contract_to_tensor, einsum, naive_ubersum, ubersum
  from pyro.ops.einsum.adjoint import require_backward
  from pyro.ops.rings import LogRing
  from pyro.poutine.indep_messenger import CondIndepStackFrame
  from pyro.util import optional
  from tests.common import assert_equal
label_desc: Use image node_id 2 for calling a global function with example usage: deep_equal(x, y) and returns: False, unknown, unknown, all, all, False, False, False