code: def simple_categorical():
      p = floatX_array([0.1, 0.2, 0.3, 0.4])
      v = floatX_array([0.0, 1.0, 2.0, 3.0])
      with Model() as model:
          Categorical("x", p, size=3, initval=[1, 2, 3])
  
      mu = np.dot(p, v)
      var = np.dot(p, (v - mu) ** 2)
      return model.initial_point(), model, (mu, var)
  
imports: from itertools import product
  import numpy
  import pytensor
  import pytensor.tensor
  from pytensor.compile.ops import as_op
  import pymc
  from pymc import Categorical, Metropolis, Model, Normal
  from pymc.pytensorf import floatX_array
label_desc: Use image node_id 3 for calling a global function with example usage: simple_categorical() and returns: model,  model,  mu,  var