code: def find_data(pmodel: Model) -> List[mcb.DataVariable]:
      """Extracts data variables from a model."""
      observed_rvs = {
          pmodel.rvs_to_values[rv] for rv in pmodel.observed_RVs
      }
      dvars = []
      # All data containers are named vars!
      for name, var in pmodel.named_vars.items():
          dv = mcb.DataVariable(name)
          if isinstance(var, Constant):
              dv.value = ndarray_from_numpy(var.data)
          elif isinstance(var, SharedVariable):
              dv.value = ndarray_from_numpy(var.get_value())
          else:
              continue
          dv.dims = list(pmodel.named_vars_to_dims.get(name, []))
          dv.is_observed = var in observed_rvs
          dvars.append(dv)
      return dvars
  
imports: import base64
  import logging
  import pickle
  from typing import Any, Dict, List, Mapping, Optional, Sequence, Tuple, Union, cast
  import hagelkorn
  import mcbackend
  import numpy
  from mcbackend.npproto.utils import ndarray_from_numpy
  from pytensor.compile.sharedvalue import SharedVariable
  from pytensor.graph.basic import Constant
  from pymc.backends.base import IBaseTrace
  from pymc.model import Model
  from pymc.pytensorf import PointFunc
  from pymc.step_methods.compound import BlockedStep, CompoundStep, StatsBijection, check_step_emits_tune, flat_statname, flatten_steps
label_desc: Use image node_id 1 for calling a global function with example usage: find_data(pmodel) and returns: dvars