code: def test_masked_probability(means, covs, X, X_masked):
      X = torch.tensor(numpy.array(X))
      y = [
          2.004972e-02,
          1.346142e-02,
          5.173831e-02,
          1.438069e-04,
          4.410233e-06,
          2.273481e-15,
          2.059388e-03,
      ]
  
      d = Normal(means, covs, covariance_type="diag")
      mask = torch.ones_like(X).type(torch.bool)
      X_ = torch.masked.MaskedTensor(X, mask=mask)
  
      assert_array_almost_equal(y, d.probability(X_)._masked_data)
  
      y = [
          2.798962e-02,
          4.825954e-02,
          1.000000e00,
          1.438069e-04,
          2.043614e-01,
          2.273480e-15,
          9.462826e-03,
      ]
  
      assert_array_almost_equal(y, d.probability(X_masked)._masked_data)
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Normal
  from ._utils import _test_initialization_raises_two_parameters
  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 40 for calling a global function with example usage: test_masked_probability(means, covs, X, X_masked) without return types