def apply_transform_model(
      self, logical_input_map: Mapping[str, common_types.TensorType]
  ) -> Dict[str, common_types.TensorType]:
    """Applies a transform graph to dictionary of (Composite)Tensors.

    Args:
      logical_input_map: a dict of logical name to Tensor.  The logical names
        must be a subset of those in the input signature of the transform graph,
        and the corresponding Tensors must have the expected types and shapes.

    Returns:
      A dict of logical name to Tensor, as provided by the output signature of
      the transform graph.
    """
    unexpected_inputs = (
        set(logical_input_map.keys()) - set(self._structured_inputs.keys()))
    if unexpected_inputs:
      raise ValueError(
          'Unexpected inputs to transform: {}'.format(unexpected_inputs))

    if self.load_v2_in_compat:
      return self._apply_v1_transform_model_in_v2(logical_input_map)
    elif self._is_finalized:
      return self._apply_v2_transform_model_finalized(logical_input_map)
    else:
      return self._apply_v2_transform_model(logical_input_map)
Applies a transform graph to dictionary of (Composite)Tensors.

    Args:
      logical_input_map: a dict of logical name to Tensor.  The logical names
        must be a subset of those in the input signature of the transform graph,
        and the corresponding Tensors must have the expected types and shapes.

    Returns:
      A dict of logical name to Tensor, as provided by the output signature of
      the transform graph.
    
tensorflow_transform/saved/saved_transform_io_v2.py