class_docstr: Handles a SavedModel exported using TF 1.x APIs in TF 2.x.
class_docstr_tok: ["Handles","a","SavedModel","exported","using","TF","1.x","APIs","in","TF","2.x","."]
docstr: Applies a V1 transform graph to dictionary of (Composite)Tensors.
  
  This method applies the transformation graph as a pruned function to the
  `logical_input_map`.
  It prunes the function loaded from the SavedModel to return only outputs
  that can be computed from the keys provided in `logical_input_map`.
  
  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.
docstr_tok: ["Applies","a","V1","transform","graph","to","dictionary","of","(","Composite",")","Tensors",".","This","method","applies","the","transformation","graph","as","a","pruned","function","to","the","`","logical_input_map","`",".","It","prunes","the","function","loaded","from","the","SavedModel","to","return","only","outputs","that","can","be","computed","from","the","keys","provided","in","`","logical_input_map","`",".","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","."]
code: def _apply_v1_transform_model_in_v2(
      self, logical_input_map: Mapping[str, common_types.TensorType]
  ) -> Dict[str, common_types.TensorType]:
      """Applies a V1 transform graph to dictionary of (Composite)Tensors.
  
      This method applies the transformation graph as a pruned function to the
      `logical_input_map`.
      It prunes the function loaded from the SavedModel to return only outputs
      that can be computed from the keys provided in `logical_input_map`.
  
      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.
      """
      input_map = saved_transform_io._expand_input_map(  # pylint: disable=protected-access
          logical_input_map, self._structured_inputs
      )
  
      feeds = []
      pruned_input_args = []
      for name in input_map:
          tensor = self._func_graph.get_tensor_by_name(name)
          try:
              tensor.shape.assert_is_compatible_with(
                  input_map[name].shape
              )
          except ValueError as e:
              raise ValueError("{}: {}".format(name, e))
          feeds.append(tensor)
          pruned_input_args.append(input_map[name])
  
      fetches = self._get_fetches(feeds)
      pruned = self._wrapped_function.prune(feeds, fetches)
      result = pruned(*pruned_input_args)
      # TODO(b/163329414): Remove set_shape when calling pruned no longer produces
      # tensors with unknown shapes.
      for name, output in fetches.items():
          if hasattr(result[name], "set_shape"):
              result[name].set_shape(output.shape)
      return result
  
imports: from typing import Any, Dict, Iterable, Mapping, Tuple, Union
  import tensorflow
  from tensorflow_transform import annotators
  from tensorflow_transform import common_types
  from tensorflow_transform import graph_tools
  from tensorflow_transform import tf2_utils
  from tensorflow_transform import tf_utils
  from tensorflow_transform.py_func import pyfunc_helper
  from tensorflow_transform.saved import constants
  from tensorflow_transform.saved import saved_model_loader
  from tensorflow_transform.saved import saved_transform_io
  from tensorflow.python.eager import function
  from tensorflow.python.eager import wrap_function
  from tensorflow.python.framework import composite_tensor
  from tensorflow.python.ops import lookup_ops
  from tensorflow.python.util import object_identity
label_desc: Use image node_id 10 for calling the SavedModelLoader obj's underlying member method code with example usage: obj._apply_v1_transform_model_in_v2(logical_input_map) and returns: result