docstr: Wraps `arg` in a placeholder to limit static shape info.
  
  Args:
    arg: The value to wrap.  A Tensor, RaggedTensor, or TensorShape.
    shape_info: One of ['known', 'unknown_dims', 'unknown_rank'].
  
  Returns:
    * If shape_info is 'known': returns `arg`.
    * If shape_info is 'unknown_dims': returns a placeholder wrapping `arg`
      where the dimension sizes are unknown.  If `arg` is a TensorShape,
      then convert it to a vector first.  If `arg` is a RaggedTensor, then
      wrap the flat_values.
    * If shape_info is 'unknown_rank': returns a placeholder wrapping `arg`
      where the rank is unknown.  If `arg` is a TensorShape, then convert it
      to a vector first.  If `arg` is a RaggedTensor, then wrap the
      flat_values.
docstr_tok: ["Wraps","`","arg","`","in","a","placeholder","to","limit","static","shape","info",".","Args",":","arg",":","The","value","to","wrap",".","A","Tensor",",","RaggedTensor",",","or","TensorShape",".","shape_info",":","One","of","[","'known","'",",","'unknown_dims","'",",","'unknown_rank","'","]",".","Returns",":","*","If","shape_info","is","'known","'",":","returns","`","arg","`",".","*","If","shape_info","is","'unknown_dims","'",":","returns","a","placeholder","wrapping","`","arg","`","where","the","dimension","sizes","are","unknown",".","If","`","arg","`","is","a","TensorShape",",","then","convert","it","to","a","vector","first",".","If","`","arg","`","is","a","RaggedTensor",",","then","wrap","the","flat_values",".","*","If","shape_info","is","'unknown_rank","'",":","returns","a","placeholder","wrapping","`","arg","`","where","the","rank","is","unknown",".","If","`","arg","`","is","a","TensorShape",",","then","convert","it","to","a","vector","first",".","If","`","arg","`","is","a","RaggedTensor",",","then","wrap","the","flat_values","."]
code: def wrap_in_placeholder(self, arg, shape_info):
      """Wraps `arg` in a placeholder to limit static shape info.
  
      Args:
        arg: The value to wrap.  A Tensor, RaggedTensor, or TensorShape.
        shape_info: One of ['known', 'unknown_dims', 'unknown_rank'].
  
      Returns:
        * If shape_info is 'known': returns `arg`.
        * If shape_info is 'unknown_dims': returns a placeholder wrapping `arg`
          where the dimension sizes are unknown.  If `arg` is a TensorShape,
          then convert it to a vector first.  If `arg` is a RaggedTensor, then
          wrap the flat_values.
        * If shape_info is 'unknown_rank': returns a placeholder wrapping `arg`
          where the rank is unknown.  If `arg` is a TensorShape, then convert it
          to a vector first.  If `arg` is a RaggedTensor, then wrap the
          flat_values.
      """
      if shape_info == "known":
          return arg
      if isinstance(arg, ragged_tensor.RaggedTensor):
          return arg.with_flat_values(
              self.wrap_in_placeholder(arg.flat_values, shape_info)
          )
      if isinstance(arg, tensor_shape.TensorShape):
          if arg.ndims is None:
              return arg
          arg = constant_op.constant(arg.as_list())
      if shape_info == "unknown_rank":
          return array_ops.placeholder_with_default(arg, None)
      if shape_info == "unknown_dims":
          return array_ops.placeholder_with_default(
              arg, [None] * arg.shape.rank
          )
      raise AssertionError("Unexpected shape_info %r" % shape_info)
  
imports: import random
  from absl.testing import parameterized
  import numpy
  from tensorflow.python.client import session
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import context
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops.ragged import ragged_factory_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged.ragged_tensor import RaggedTensor
  from tensorflow.python.platform import benchmark
  from tensorflow.python.platform import googletest
  from tensorflow.python.util import nest
label_desc: Use image node_id 18 for calling the RaggedTensorToTensorOpTest obj's underlying member method code with example usage: obj.wrap_in_placeholder(arg, shape_info) and returns: arg, arg, array_ops, array_ops, arg