code: def draw(
      vars: Union[Variable, Sequence[Variable]],
      draws: int = 1,
      random_seed: RandomState = None,
      **kwargs,
  ) -> Union[np.ndarray, List[np.ndarray]]:
      """Draw samples for one variable or a list of variables
  
      Parameters
      ----------
      vars : TensorVariable or iterable of TensorVariable
          A variable or a list of variables for which to draw samples.
      draws : int, default 1
          Number of samples needed to draw.
      random_seed : int, RandomState or numpy_Generator, optional
          Seed for the random number generator.
      **kwargs : dict, optional
          Keyword arguments for :func:`pymc.pytensorf.compile_pymc`.
  
      Returns
      -------
      list of ndarray
          A list of numpy arrays.
  
      Examples
      --------
          .. code-block:: python
  
              import pymc as pm
  
              # Draw samples for one variable
              with pm.Model():
                  x = pm.Normal("x")
              x_draws = pm.draw(x, draws=100)
              print(x_draws.shape)
  
              # Draw 1000 samples for several variables
              with pm.Model():
                  x = pm.Normal("x")
                  y = pm.Normal("y", shape=10)
                  z = pm.Uniform("z", shape=5)
              num_draws = 1000
              # Draw samples of a list variables
              draws = pm.draw([x, y, z], draws=num_draws)
              assert draws[0].shape == (num_draws,)
              assert draws[1].shape == (num_draws, 10)
              assert draws[2].shape == (num_draws, 5)
      """
      if random_seed is not None:
          (random_seed,) = _get_seeds_per_chain(random_seed, 1)
  
      draw_fn = compile_pymc(
          inputs=[], outputs=vars, random_seed=random_seed, **kwargs
      )
  
      if draws == 1:
          return draw_fn()
  
      # Single variable output
      if not isinstance(vars, (list, tuple)):
          cast(Callable[[], np.ndarray], draw_fn)
          return np.stack([draw_fn() for _ in range(draws)])
  
      # Multiple variable output
      cast(Callable[[], List[np.ndarray]], draw_fn)
      drawn_values = zip(*(draw_fn() for _ in range(draws)))
      return [np.stack(v) for v in drawn_values]
  
imports: import logging
  import warnings
  from typing import Any, Callable, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Union, cast
  import numpy
  import xarray
  from arviz import InferenceData
  from fastprogress.fastprogress import progress_bar
  from pytensor import tensor
  from pytensor.graph.basic import Apply, Constant, Variable, ancestors, general_toposort, walk
  from pytensor.graph.fg import FunctionGraph
  from pytensor.tensor.random.var import RandomGeneratorSharedVariable, RandomStateSharedVariable
  from pytensor.tensor.sharedvar import SharedVariable
  from typing_extensions import TypeAlias
  import pymc
  from pymc.backends.arviz import _DefaultTrace
  from pymc.backends.base import MultiTrace
  from pymc.blocking import PointType
  from pymc.model import Model, modelcontext
  from pymc.pytensorf import compile_pymc
  from pymc.util import RandomState, _get_seeds_per_chain, dataset_to_point_list, get_default_varnames, point_wrapper
label_desc: Use image node_id 3 for calling a global function with example usage: draw(vars, draws, random_seed) and returns: unknown, draw_fn, np