code: def model_with_dims():
      with pm.Model(
          coords={
              "city": ["Aachen", "Maastricht", "London", "Bergheim"]
          }
      ) as pmodel:
          economics = pm.Uniform(
              "economics", lower=-1, upper=1, shape=(1,)
          )
  
          population = pm.HalfNormal(
              "population", sigma=5, dims=("city")
          )
  
          time = pm.ConstantData(
              "time", [2014, 2015, 2016], dims="year"
          )
  
          n = pm.Deterministic(
              "tax revenue",
              economics * population[None, :] * time[:, None],
              dims=("year", "city"),
          )
  
          yobs = pm.MutableData("observed", np.ones((3, 4)))
          L = pm.Normal("L", n, observed=yobs)
  
      compute_graph = {
          "economics": set(),
          "population": set(),
          "time": set(),
          "tax revenue": {"economics", "population", "time"},
          "L": {"tax revenue"},
          "observed": {"L"},
      }
      plates = {
          "1": {"economics"},
          "city (4)": {"population"},
          "year (3)": {"time"},
          "year (3) x city (4)": {"tax revenue"},
          "3 x 4": {"L", "observed"},
      }
  
      return pmodel, 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 4 for calling a global function with example usage: model_with_dims() and returns: pmodel,  compute_graph,  plates