code: def test_masked_log_probability(lambdas, X, X_masked):
      X = torch.tensor(numpy.array(X))
      y = [
          -4.435252,
          -4.358063,
          -3.539164,
          -4.155351,
          -5.757008,
          -8.598402,
          -4.840717,
      ]
  
      d = Poisson(lambdas)
      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.417574,
          -3.0,
          0.0,
          -4.155351,
          -1.212213,
          -8.598402,
          -3.628504,
      ]
  
      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 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 41 for calling a global function with example usage: test_masked_log_probability(lambdas, X, X_masked) without return types