code: def test_censored_workflow(self, censored):
      # Based on pymc-examples/censored_data
      rng = np.random.default_rng(1234)
      size = 500
      true_mu = 13.0
      true_sigma = 5.0
  
      # Set censoring limits
      low = 3.0
      high = 16.0
  
      # Draw censored samples
      data = rng.normal(true_mu, true_sigma, size)
      data[data <= low] = low
      data[data >= high] = high
  
      rng = 17092021
      with pm.Model() as m:
          mu = pm.Normal(
              "mu",
              mu=((high - low) / 2) + low,
              sigma=(high - low) / 2.0,
              initval="moment",
          )
          sigma = pm.HalfNormal(
              "sigma", sigma=(high - low) / 2.0, initval="moment"
          )
          observed = pm.Censored(
              "observed",
              pm.Normal.dist(mu=mu, sigma=sigma),
              lower=low if censored else None,
              upper=high if censored else None,
              observed=data,
          )
  
          prior_pred = pm.sample_prior_predictive(random_seed=rng)
          posterior = pm.sample(tune=500, draws=500, random_seed=rng)
          posterior_pred = pm.sample_posterior_predictive(
              posterior, random_seed=rng
          )
  
      expected = True if censored else False
      assert (9 < prior_pred.prior_predictive.mean() < 10) == expected
      assert (13 < posterior.posterior["mu"].mean() < 14) == expected
      assert (
          4.5 < posterior.posterior["sigma"].mean() < 5.5
      ) == expected
      assert (
          12 < posterior_pred.posterior_predictive.mean() < 13
      ) == expected
  
file_path: pymc/tests/distributions/test_censored.py
imports: import numpy
  import pytest
  import pymc
  from pymc.distributions.shape_utils import change_dist_size
label_desc: Use image node_id 1 for calling the TestCensored obj's underlying member method code with example usage: obj.test_censored_workflow(censored) without return types