code: def test_missing_data_model(self):
      # source tests/test_missing.py
      data = ma.masked_values([1, 2, -1, 4, -1], value=-1)
      model = pm.Model()
      with model:
          x = pm.Normal("x", 1, 1)
          with pytest.warns(ImputationWarning):
              y = pm.Normal("y", x, 1, observed=data)
          inference_data = pm.sample(
              100,
              chains=2,
              return_inferencedata=True,
              idata_kwargs=dict(log_likelihood=True),
          )
  
      # make sure that data is really missing
      assert "y_unobserved" in model.named_vars
  
      test_dict = {
          "posterior": ["x", "y_unobserved"],
          "observed_data": ["y_observed"],
          "log_likelihood": ["y_observed"],
      }
      fails = check_multiple_attrs(test_dict, inference_data)
      assert not fails
  
      # The missing part of partial observed RVs is not included in log_likelihood
      # See https://github.com/pymc-devs/pymc/issues/5255
      assert inference_data.log_likelihood["y_observed"].shape == (
          2,
          100,
          3,
      )
  
imports: import warnings
  from typing import Dict, Tuple
  import numpy
  import pytensor.tensor
  import pytest
  from arviz import InferenceData
  from arviz.tests.helpers import check_multiple_attrs
  from numpy import ma
  from pytensor.tensor.subtensor import AdvancedIncSubtensor, AdvancedIncSubtensor1
  import pymc
  from pymc.backends.arviz import InferenceDataConverter, predictions_to_inference_data, to_inference_data
  from pymc.exceptions import ImputationWarning
label_desc: Use image node_id 12 for calling the TestDataPyMC obj's underlying member method code with example usage: obj.test_missing_data_model() without return types