code: def test_probability(X, distributions):
      y = [
          0.004881,
          0.004364,
          0.033653,
          0.00419,
          0.004555,
          0.001438,
          0.01238,
      ]
  
      d = IndependentComponents(distributions)
      _test_predictions(X, y, d.probability(X), torch.float32)
  
      d1 = Exponential([1.2])
      d2 = Exponential([7.5])
      d3 = Exponential([1.2, 7.5])
      d = IndependentComponents([d1, d2])
  
      x = [[1.0, 2.0], [2.0, 2.0], [0.0, 1.0], [0.0, 0.0]]
      y = [0.036986, 0.016074, 0.097241, 0.111111]
      _test_predictions(x, y, d.probability(x), torch.float32)
      _test_predictions(
          x, d.probability(x), d3.probability(x), torch.float32
      )
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Exponential
  from pomegranate.distributions import Gamma
  from pomegranate.distributions import Categorical
  from pomegranate.distributions import IndependentComponents
  from ._utils import _test_initialization_raises_one_parameter
  from ._utils import _test_initialization
  from ._utils import _test_predictions
  from ._utils import _test_efd_from_summaries
  from ._utils import _test_raises
  from nose.tools import assert_raises
  from numpy.testing import assert_array_almost_equal
label_desc: Use image node_id 10 for calling a global function with example usage: test_probability(X, distributions) without return types