code: def test_masked_log_probability(means, covs, X, X_masked):
      X = torch.tensor(numpy.array(X))
      y = [
          -3.90954,
          -4.307928,
          -2.961557,
          -8.847039,
          -12.331583,
          -33.717464,
          -6.185347,
      ]
  
      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.log_probability(X_)._masked_data)
  
      y = [
          -3.575922,
          -3.031162,
          0.0,
          -8.847039,
          -1.587865,
          -33.717464,
          -4.660384,
      ]
  
      assert_array_almost_equal(
          y, d.log_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 41 for calling a global function with example usage: test_masked_log_probability(means, covs, X, X_masked) without return types