code: def test_sample(self, seeded_test):
      x = np.random.normal(size=100)
      y = x + np.random.normal(scale=1e-2, size=100)
  
      x_pred = np.linspace(-3, 3, 200, dtype="float32")
  
      with pm.Model():
          x_shared = pm.MutableData("x_shared", x)
          b = pm.Normal("b", 0.0, 10.0)
          pm.Normal(
              "obs",
              b * x_shared,
              np.sqrt(1e-2),
              observed=y,
              shape=x_shared.shape,
          )
  
          prior_trace0 = pm.sample_prior_predictive(1000)
          idata = pm.sample(1000, tune=1000, chains=1)
          pp_trace0 = pm.sample_posterior_predictive(idata)
  
          x_shared.set_value(x_pred)
          prior_trace1 = pm.sample_prior_predictive(1000)
          pp_trace1 = pm.sample_posterior_predictive(idata)
  
      assert prior_trace0.prior["b"].shape == (1, 1000)
      assert prior_trace0.prior_predictive["obs"].shape == (
          1,
          1000,
          100,
      )
      assert prior_trace1.prior_predictive["obs"].shape == (
          1,
          1000,
          200,
      )
  
      assert pp_trace0.posterior_predictive["obs"].shape == (
          1,
          1000,
          100,
      )
      np.testing.assert_allclose(
          x,
          pp_trace0.posterior_predictive["obs"].mean(("chain", "draw")),
          atol=1e-1,
      )
  
      assert pp_trace1.posterior_predictive["obs"].shape == (
          1,
          1000,
          200,
      )
      np.testing.assert_allclose(
          x_pred,
          pp_trace1.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 2 for calling the TestData obj's underlying member method code with example usage: obj.test_sample(seeded_test) without return types