code: def test_masked_probability(lambdas, X, X_masked):
      X = torch.tensor(numpy.array(X))
      y = [
          0.011852,
          0.012803,
          0.029038,
          0.01568,
          0.003161,
          0.000184,
          0.007901,
      ]
  
      d = Poisson(lambdas)
      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 = [
          3.279189e-02,
          4.978707e-02,
          1.000000e00,
          1.568029e-02,
          2.975380e-01,
          1.844002e-04,
          2.655589e-02,
      ]
  
      assert_array_almost_equal(y, d.probability(X_masked)._masked_data)
  
imports: import os
  import numpy
  import torch
  import pytest
  from pomegranate.distributions import Poisson
  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 40 for calling a global function with example usage: test_masked_probability(lambdas, X, X_masked) without return types