code: def transformed_conditional_logp(
      rvs: Sequence[TensorVariable],
      *,
      rvs_to_values: Dict[TensorVariable, TensorVariable],
      rvs_to_transforms: Dict[TensorVariable, Transform],
      jacobian: bool = True,
      **kwargs,
  ) -> List[TensorVariable]:
      """Thin wrapper around conditional_logprob, which creates a value transform rewrite.
  
      This helper will only return the subset of logprob terms corresponding to `rvs`.
      All rvs_to_values and rvs_to_transforms mappings are required.
      """
  
      transform_rewrite = None
      values_to_transforms = {
          rvs_to_values[rv]: transform
          for rv, transform in rvs_to_transforms.items()
          if transform is not None
      }
      if values_to_transforms:
          # There seems to be an incorrect type hint in TransformValuesRewrite
          transform_rewrite = TransformValuesRewrite(values_to_transforms)  # type: ignore
  
      kwargs.setdefault("warn_rvs", False)
      temp_logp_terms = conditional_logp(
          rvs_to_values,
          extra_rewrites=transform_rewrite,
          use_jacobian=jacobian,
          **kwargs,
      )
  
      # The function returns the logp for every single value term we provided to it.
      # This includes the extra values we plugged in above, so we filter those we
      # actually wanted in the same order they were given in.
      logp_terms = {}
      for rv in rvs:
          value_var = rvs_to_values[rv]
          logp_terms[value_var] = temp_logp_terms[value_var]
  
      logp_terms_list = list(logp_terms.values())
  
      rvs_in_logp_expressions = _find_unallowed_rvs_in_graph(
          logp_terms_list
      )
      if rvs_in_logp_expressions:
          raise ValueError(
              RVS_IN_JOINT_LOGP_GRAPH_MSG % rvs_in_logp_expressions
          )
  
      return logp_terms_list
  
imports: import warnings
  from collections import deque
  from typing import Dict, List, Optional, Sequence, Union
  import numpy
  import pytensor.tensor
  from pytensor import config
  from pytensor.graph.basic import Constant, Variable, ancestors, graph_inputs, io_toposort
  from pytensor.graph.op import compute_test_value
  from pytensor.graph.rewriting.basic import GraphRewriter, NodeRewriter
  from pytensor.tensor.variable import TensorVariable
  from typing_extensions import TypeAlias
  from pymc.logprob.abstract import MeasurableVariable, _icdf_helper, _logcdf_helper, _logprob, _logprob_helper
  from pymc.logprob.rewriting import cleanup_ir, construct_ir_fgraph
  from pymc.logprob.transform_value import TransformValuesRewrite
  from pymc.logprob.transforms import Transform
  from pymc.logprob.utils import rvs_in_graph
  from pymc.pytensorf import replace_vars_in_graphs
label_desc: Use image node_id 8 for calling a global function with example usage: transformed_conditional_logp(rvs) and returns: logp_terms_list