code: def find_measurable_switch_mixture(fgraph, node):
      rv_map_feature: Optional[PreserveRVMappings] = getattr(
          fgraph, "preserve_rv_mappings", None
      )
  
      if rv_map_feature is None:
          return None  # pragma: no cover
  
      switch_cond, *components = node.inputs
  
      # We don't support broadcasting of components, as that yields dependent (identical) values.
      # The current logp implementation assumes all component values are independent.
      # Broadcasting of the switch condition is fine
      out_bcast = node.outputs[0].type.broadcastable
      if any(
          comp.type.broadcastable != out_bcast for comp in components
      ):
          return None
  
      # Check that `switch_cond` is not potentially measurable
      valued_rvs = rv_map_feature.rv_values.keys()
      if check_potential_measurability([switch_cond], valued_rvs):
          return None
  
      if rv_map_feature.request_measurable(components) != components:
          return None
  
      return [measurable_switch_mixture(switch_cond, *components)]
  
imports: from typing import List, Optional, Tuple, Union, cast
  import pytensor
  import pytensor.tensor
  from pytensor.graph.basic import Apply, Constant, Variable
  from pytensor.graph.fg import FunctionGraph
  from pytensor.graph.op import Op, compute_test_value
  from pytensor.graph.rewriting.basic import EquilibriumGraphRewriter, node_rewriter
  from pytensor.ifelse import IfElse, ifelse
  from pytensor.scalar import Switch
  from pytensor.scalar import switch
  from pytensor.tensor.basic import Join, MakeVector, switch
  from pytensor.tensor.random.rewriting import local_dimshuffle_rv_lift, local_rv_size_lift, local_subtensor_rv_lift
  from pytensor.tensor.rewriting.shape import ShapeFeature
  from pytensor.tensor.shape import shape_tuple
  from pytensor.tensor.subtensor import AdvancedSubtensor, AdvancedSubtensor1, as_index_literal, get_canonical_form_slice, is_basic_idx
  from pytensor.tensor.type import TensorType
  from pytensor.tensor.type_other import NoneConst, NoneTypeT, SliceConstant, SliceType
  from pytensor.tensor.variable import TensorVariable
  from pymc.logprob.abstract import MeasurableElemwise, MeasurableVariable, _logprob, _logprob_helper
  from pymc.logprob.rewriting import PreserveRVMappings, assume_measured_ir_outputs, local_lift_DiracDelta, measurable_ir_rewrites_db, subtensor_ops
  from pymc.logprob.utils import check_potential_measurability, replace_rvs_by_values
  from pymc.pytensorf import constant_fold
label_desc: Use image node_id 7 for calling a global function with example usage: find_measurable_switch_mixture(fgraph, node) and returns: list, None, None, None, None