class_docstr: A collection of tensors encoding the shape of a potentially ragged tensor.
  
  Each `RaggedTensorDynamicShape` consists of an ordered list of dimension
  sizes.  There are two dimension types:
  
    * "Uniform dimensions" are dimensions where all slices have the same
      length.  `RaggedTensorDynamicShape` records the size of each uniform
      dimension using a single scalar integer.
  
    * "Ragged dimensions" are dimensions whose slices may have different
      lengths.  `RaggedTensorDynamicShape` records the size of each ragged
      dimension using an integer vector containing the slice lengths for all
      the slices across that dimension.
  
  Furthermore, there are two ways a dimension might be encoded:
  
    * "Partitioned dimensions" are dimensions that are encoded using a
      `RaggedTensor`'s `nested_row_splits`.  The outermostmost partitioned
      dimension must be uniform, and the innermost partitioned dimension must
      be ragged.
  
    * "Inner dimensions" are dimensions that are encoded using a
      `RaggedTensor`'s `flat_values`.  Inner dimensions are always uniform.
  
  The sizes of partitioned dimensions are recorded using `partitioned_dim_sizes`
  and `inner_dim_sizes`:
  
    * `partitioned_dim_sizes` is a list of tensors (one for each partitioned
      dimension).
  
      * For uniform dimensions, the tensor is an integer scalar specifying the
        size of all slices across that dimension.
      * For ragged dimensions, the tensor is an integer vector specifying the
        size of each slice across that dimension.
  
    * `inner_dim_sizes` is a single integer vector, where each element
      specifies the size of a single inner dimension.
  
  Examples:
  
  Tensor                         | Ragged | Partitioned Dim Sizes  | Inner Dim
                                 : Rank   :                        : Sizes
  ------------------------------ | ------ | ---------------------- | ----------
  `[[1, 2, 3], [4, 5, 6]]`       |      0 |                        | `2, 3`
  `[[1, 2], [], [3, 4, 5]]`      |      1 | `3, (2, 0, 3)`         |
  `[[[1, 2], [3, 4]], [[5, 6]]]` |      1 | `2, (2, 1)`            | 2
  `[[[1, 2], [3]], [[4, 5]]]`    |      2 | `2, (2, 1), (2, 1, 2)` |
docstr: Constructs a ragged shape for a potentially ragged tensor.
code: def from_tensor(cls, rt_input, dim_size_dtype=None):
      """Constructs a ragged shape for a potentially ragged tensor."""
      with ops.name_scope(
          None, "RaggedTensorDynamicShapeFromTensor", [rt_input]
      ):
          rt_input = ragged_tensor.convert_to_tensor_or_ragged_tensor(
              rt_input
          )
          if not ragged_tensor.is_ragged(rt_input):
              return cls(
                  [],
                  array_ops.shape(rt_input),
                  dim_size_dtype=dim_size_dtype,
              )
          else:
              partitioned_dim_sizes = (
                  rt_input.nrows(),
              ) + rt_input.nested_row_lengths()
              return RaggedTensorDynamicShape(
                  partitioned_dim_sizes,
                  array_ops.shape(rt_input.flat_values)[1:],
                  dim_size_dtype=dim_size_dtype,
              )
  
imports: from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_shape
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import control_flow_assert
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops.ragged import ragged_array_ops
  from tensorflow.python.ops.ragged import ragged_config
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import ragged_util
label_desc: Use image node_id 4 for calling the RaggedTensorDynamicShape obj's underlying member method code with example usage: obj.from_tensor(cls, rt_input, dim_size_dtype) and returns: cls, RaggedTensorDynamicShape