code: def test_log_probability(X, model, model2):
      prob = model.log_probability(X)
      assert_array_almost_equal(
          prob,
          [
              -8.701405,
              -8.402749,
              -7.599903,
              -8.467403,
              -8.13342,
              -10.03488,
              -9.909716,
              -8.649725,
              -8.13342,
              -9.724506,
              -9.341732,
          ],
      )
  
      prob = model2.log_probability(X)
      assert_array_almost_equal(
          prob,
          [
              -9.877171,
              -9.293722,
              -9.540699,
              -8.259764,
              -8.085411,
              -11.535683,
              -10.554853,
              -8.442085,
              -8.085411,
              -10.680017,
              -10.437071,
          ],
      )
  
imports: import numpy
  import torch
  import pytest
  from pomegranate.factor_graph import FactorGraph
  from pomegranate.distributions import Exponential
  from pomegranate.distributions import Categorical
  from pomegranate.distributions import JointCategorical
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 15 for calling a global function with example usage: test_log_probability(X, model, model2) without return types