code: def test_learn_structure_exact(X):
      X = numpy.array(X)
      X[:, 1] = X[:, 3]
  
      model = BayesianNetwork(algorithm="exact")
      model.fit(X)
  
      assert_tuple_equal(model._parents, ((), (), (0, 1), ()))
  
      assert_array_almost_equal(
          model.distributions[0].probs, [[0.4545, 0.5455]], 4
      )
      assert_array_almost_equal(
          model.distributions[1].probs, [[0.4545, 0.5455]], 4
      )
      assert_array_almost_equal(
          model.distributions[3].probs, [[0.4545, 0.5455]], 4
      )
      assert_array_almost_equal(
          model.distributions[2].probs[0],
          [
              [[0.3333, 0.6667], [1.0000, 0.0000]],
              [[0.5, 0.5], [0.5, 0.5]],
          ],
          4,
      )
  
      assert_array_almost_equal(
          model._factor_graph.factors[0].probs, [[0.4545, 0.5455]], 4
      )
      assert_array_almost_equal(
          model._factor_graph.factors[1].probs, [[0.4545, 0.5455]], 4
      )
      assert_array_almost_equal(
          model._factor_graph.factors[3].probs, [[0.4545, 0.5455]], 4
      )
      assert_array_almost_equal(
          model._factor_graph.factors[2].probs,
          [
              [[0.0833, 0.1667], [0.2500, 0.0000]],
              [[0.1250, 0.1250], [0.1250, 0.1250]],
          ],
          4,
      )
  
imports: import numpy
  import torch
  import pytest
  from pomegranate.bayesian_network import BayesianNetwork
  from pomegranate.distributions import Exponential
  from pomegranate.distributions import Categorical
  from pomegranate.distributions import ConditionalCategorical
  from nose.tools import assert_raises
  from numpy.testing import assert_array_equal
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 32 for calling a global function with example usage: test_learn_structure_exact(X) without return types