code: def assert_tuple_equal(x, y):
      assert len(x) == len(y)
  
      for i in range(len(x)):
          assert len(x[i]) == len(y[i])
  
          if len(x[i]) > 0:
              for j in range(len(x[i])):
                  assert x[i][j] == y[i][j]
  
imports: import numpy
  import torch
  import pytest
  from pomegranate.bayesian_network import BayesianNetwork
  from pomegranate.bayesian_network import _from_structure
  from pomegranate.bayesian_network import _learn_structure
  from pomegranate.bayesian_network import _categorical_exact
  from pomegranate.bayesian_network import _categorical_chow_liu
  from pomegranate.distributions import Categorical
  from pomegranate.distributions import ConditionalCategorical
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 1 for calling a global function with example usage: assert_tuple_equal(x, y) without return types