code: def test_masked_log_probability(scales, X, X_masked):
      X = torch.tensor(numpy.array(X))
      y = [
          -3.45649,
          -1.988236,
          -3.853315,
          -5.242204,
          -4.567601,
          -8.13903,
          -3.734268,
      ]
  
      d = Exponential(scales)
      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 = [
          -2.440835,
          -0.770108,
          0.0,
          -5.242204,
          -1.143342,
          -8.13903,
          -2.590925,
      ]
  
      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 Exponential
  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(scales, X, X_masked) without return types