code: def test_sample_after_set_data(self):
      with pm.Model() as model:
          x = pm.MutableData("x", [1.0, 2.0, 3.0])
          y = pm.MutableData("y", [1.0, 2.0, 3.0])
          beta = pm.Normal("beta", 0, 10.0)
          pm.Normal("obs", beta * x, np.sqrt(1e-2), observed=y)
          pm.sample(
              1000,
              tune=1000,
              chains=1,
              compute_convergence_checks=False,
          )
      # Predict on new data.
      new_x = [5.0, 6.0, 9.0]
      new_y = [5.0, 6.0, 9.0]
      with model:
          pm.set_data(new_data={"x": new_x, "y": new_y})
          new_idata = pm.sample(
              1000,
              tune=1000,
              chains=1,
              compute_convergence_checks=False,
          )
          pp_trace = pm.sample_posterior_predictive(new_idata)
  
      assert pp_trace.posterior_predictive["obs"].shape == (1, 1000, 3)
      np.testing.assert_allclose(
          new_y,
          pp_trace.posterior_predictive["obs"].mean(("chain", "draw")),
          atol=1e-1,
      )
  
imports: import io
  import itertools
  import re
  import cloudpickle
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor import shared
  from pytensor.tensor.variable import TensorVariable
  import pymc
  from pymc.data import is_minibatch
  from pymc.pytensorf import GeneratorOp, floatX
label_desc: Use image node_id 5 for calling the TestData obj's underlying member method code with example usage: obj.test_sample_after_set_data() without return types