code: def check_step_emits_tune(step: Union[CompoundStep, BlockedStep]):
      if (
          isinstance(step, BlockedStep)
          and "tune" not in step.stats_dtypes_shapes
      ):
          raise TypeError(
              f"{type(step)} does not emit the required 'tune' stat."
          )
      elif isinstance(step, CompoundStep):
          for sstep in step.methods:
              if "tune" not in sstep.stats_dtypes_shapes:
                  raise TypeError(
                      f"{type(sstep)} does not emit the required 'tune' stat."
                  )
      return
  
imports: import warnings
  from abc import ABC, abstractmethod
  from enum import IntEnum, unique
  from typing import Any, Dict, Iterable, List, Mapping, Sequence, Tuple, Union
  import numpy
  from pytensor.graph.basic import Variable
  from pymc.blocking import PointType, StatDtype, StatsDict, StatShape, StatsType
  from pymc.model import modelcontext
label_desc: Use image node_id 5 for calling a global function with example usage: check_step_emits_tune(step) without return types