code: def test_masked_probability(distributions, X, X_masked):
      X = torch.tensor(numpy.array(X))
      y = [
          0.004068,
          0.001214,
          0.028045,
          0.001165,
          0.003795,
          0.0004,
          0.010317,
      ]
  
      d3 = Exponential([4.0])
      d = IndependentComponents(
          [distributions[0], distributions[1], d3]
      )
      mask = torch.ones_like(X).type(torch.bool)
      X_ = torch.masked.MaskedTensor(X, mask=mask)
  
      assert_array_almost_equal(y, d.probability(X_))
  
      y = [
          1.105751e-02,
          6.233579e-03,
          1.000000e00,
          1.165453e-03,
          3.049322e-01,
          4.000343e-04,
          3.383382e-02,
      ]
  
      assert_array_almost_equal(y, d.probability(X_masked))
  
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 26 for calling a global function with example usage: test_masked_probability(distributions, X, X_masked) without return types