code: def radon_model():
      """Similar in shape to the Radon model"""
      n_homes = 919
      counties = 85
      uranium = np.random.normal(-0.1, 0.4, size=n_homes)
      xbar = np.random.normal(1, 0.1, size=n_homes)
      floor_measure = np.random.randint(0, 2, size=n_homes)
  
      d, r = divmod(919, 85)
      county = np.hstack(
          (np.tile(np.arange(counties, dtype=int), d), np.arange(r))
      )
      with pm.Model() as model:
          sigma_a = pm.HalfCauchy("sigma_a", 5)
          gamma = pm.Normal("gamma", mu=0.0, sigma=1e5, shape=3)
          mu_a = pm.Deterministic(
              "mu_a", gamma[0] + gamma[1] * uranium + gamma[2] * xbar
          )
          eps_a = pm.Normal(
              "eps_a", mu=0, sigma=sigma_a, shape=counties
          )
          a = pm.Deterministic("a", mu_a + eps_a[county])
          b = pm.Normal("b", mu=0.0, sigma=1e15)
          sigma_y = pm.Uniform("sigma_y", lower=0, upper=100)
  
          # Anonymous SharedVariables don't show up
          floor_measure = pytensor.shared(floor_measure)
          floor_measure_offset = pm.MutableData(
              "floor_measure_offset", 1
          )
          y_hat = a + b * floor_measure + floor_measure_offset
          log_radon = pm.MutableData(
              "log_radon", np.random.normal(1, 1, size=n_homes)
          )
          y_like = pm.Normal(
              "y_like", mu=y_hat, sigma=sigma_y, observed=log_radon
          )
  
      compute_graph = {
          # variable_name : set of named parents in the graph
          "sigma_a": set(),
          "gamma": set(),
          "mu_a": {"gamma"},
          "eps_a": {"sigma_a"},
          "a": {"mu_a", "eps_a"},
          "b": set(),
          "sigma_y": set(),
          "y_like": {"a", "b", "sigma_y", "floor_measure_offset"},
          "floor_measure_offset": set(),
          # observed data don't have parents in the model graph, but are shown as descendants
          # of the model variables that the observations belong to:
          "log_radon": {"y_like"},
      }
      plates = {
          "": {"b", "sigma_a", "sigma_y", "floor_measure_offset"},
          "3": {"gamma"},
          "85": {"eps_a"},
          "919": {"a", "mu_a", "y_like", "log_radon"},
      }
      return model, compute_graph, plates
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  import pytest
  from pytensor.compile.sharedvalue import SharedVariable
  from pytensor.tensor.variable import TensorConstant
  import pymc
  from pymc.exceptions import ImputationWarning
  from pymc.model_graph import ModelGraph, model_to_graphviz, model_to_networkx
label_desc: Use image node_id 2 for calling a global function with example usage: radon_model() and returns: model,  compute_graph,  plates