code: def test_predict_proba_cycle(X, X_masked, distributions):
      model = BayesianNetwork(structure=((1,), (2,), (3,), (0,))).fit(X)
      y_hat = model.predict_proba(X_masked)
  
      assert_array_almost_equal(
          y_hat[0],
          [
              [0.4737, 0.5263],
              [1.0000, 0.0000],
              [0.6065, 0.3935],
              [0.0000, 1.0000],
              [0.3825, 0.6175],
              [1.0000, 0.0000],
              [0.6065, 0.3935],
              [0.0000, 1.0000],
              [0.0000, 1.0000],
              [1.0000, 0.0000],
              [1.0000, 0.0000],
          ],
          4,
      )
  
      assert_array_almost_equal(
          y_hat[1],
          [
              [0.0000, 0.0000, 1.0000],
              [1.0000, 0.0000, 0.0000],
              [0.3435, 0.3728, 0.2837],
              [0.0000, 0.0000, 1.0000],
              [0.0000, 1.0000, 0.0000],
              [0.0000, 1.0000, 0.0000],
              [0.3435, 0.3728, 0.2837],
              [0.2564, 0.2308, 0.5128],
              [0.0000, 1.0000, 0.0000],
              [0.0000, 0.0000, 1.0000],
              [0.2564, 0.6154, 0.1282],
          ],
          4,
      )
  
      assert_array_almost_equal(
          y_hat[2],
          [
              [1.0000, 0.0000],
              [0.2997, 0.7003],
              [0.3935, 0.6065],
              [0.0000, 1.0000],
              [0.8025, 0.1975],
              [1.0000, 0.0000],
              [0.3935, 0.6065],
              [0.0000, 1.0000],
              [1.0000, 0.0000],
              [0.0000, 1.0000],
              [1.0000, 0.0000],
          ],
          4,
      )
  
      assert_array_almost_equal(
          y_hat[3],
          [
              [1.0000, 0.0000],
              [0.6530, 0.3470],
              [1.0000, 0.0000],
              [0.0000, 1.0000],
              [0.3728, 0.6272],
              [0.4737, 0.5263],
              [1.0000, 0.0000],
              [0.0000, 1.0000],
              [0.2308, 0.7692],
              [1.0000, 0.0000],
              [0.4737, 0.5263],
          ],
          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 21 for calling a global function with example usage: test_predict_proba_cycle(X, X_masked, distributions) without return types