code: def marginal_mixture_default_transform(op, rv):
      def transform_warning():
          warnings.warn(
              f"No safe default transform found for Mixture distribution {rv}. This can "
              "happen when components have different supports or default transforms.\n"
              "If appropriate, you can specify a custom transform for more efficient sampling.",
              MixtureTransformWarning,
              stacklevel=2,
          )
  
      rng, weights, *components = rv.owner.inputs
  
      default_transforms = [
          _default_transform(component.owner.op, component)
          for component in components
      ]
  
      # If there are more than one type of default transforms, we do not apply any
      if (
          len({type(transform) for transform in default_transforms})
          != 1
      ):
          transform_warning()
          return None
  
      default_transform = default_transforms[0]
  
      if default_transform is None:
          return None
  
      if not isinstance(
          default_transform, allowed_default_mixture_transforms
      ):
          transform_warning()
          return None
  
      if isinstance(default_transform, IntervalTransform):
          # If there are more than one component, we need to check the IntervalTransform
          # of the components are actually equivalent (e.g., we don't have an
          # Interval(0, 1), and an Interval(0, 2)).
          if len(default_transforms) > 1:
              value = rv.type()
              backward_expressions = [
                  transform.backward(value, *component.owner.inputs)
                  for transform, component in zip(
                      default_transforms, components
                  )
              ]
              for expr1, expr2 in zip(
                  backward_expressions[:-1], backward_expressions[1:]
              ):
                  if not equal_computations([expr1], [expr2]):
                      transform_warning()
                      return None
  
          # We need to create a new IntervalTransform that expects the Mixture inputs
          args_fn = default_transform.args_fn
  
          def mixture_args_fn(rng, weights, *components):
              # We checked that the interval transforms of each component are equivalent,
              # so we can just pass the inputs of the first component
              return args_fn(*components[0].owner.inputs)
  
          return IntervalTransform(args_fn=mixture_args_fn)
  
      else:
          return default_transform
  
imports: import warnings
  import numpy
  import pytensor
  import pytensor.tensor
  from pytensor.graph.basic import Node, equal_computations
  from pytensor.tensor import TensorVariable
  from pytensor.tensor.random.op import RandomVariable
  from pymc.distributions import transforms
  from pymc.distributions.continuous import Gamma, LogNormal, Normal, get_tau_sigma
  from pymc.distributions.discrete import Binomial, NegativeBinomial, Poisson
  from pymc.distributions.dist_math import check_parameters
  from pymc.distributions.distribution import DiracDelta, Distribution, SymbolicRandomVariable, _moment, moment
  from pymc.distributions.shape_utils import _change_dist_size, change_dist_size
  from pymc.distributions.transforms import _default_transform
  from pymc.distributions.truncated import Truncated
  from pymc.logprob.abstract import _logcdf, _logcdf_helper, _logprob
  from pymc.logprob.basic import logp
  from pymc.logprob.transforms import IntervalTransform
  from pymc.pytensorf import floatX
  from pymc.util import check_dist_not_registered
  from pymc.vartypes import continuous_types, discrete_types
label_desc: Use image node_id 5 for calling a global function with example usage: marginal_mixture_default_transform(op, rv) and returns: None, None, None, IntervalTransform, default_transform, args_fn, None