def partition_from_ragged_tensor_by_name(ragged_tensor, partition_type: str):
    """Extract row partition tensor from ragged tensor defined by string identifier of the partition scheme.

    Args:
        ragged_tensor (tf.RaggedTensor): Ragged tensor to extract row partition from.
        partition_type (str): String identifier of the partition scheme. Either `row_splits`, `row_limits` etc.

    Returns:
        tf.Tensor: Row partition defined by partition_type.
    """
    # Not for nested ragged definition
    flat_tens = ragged_tensor.values
    if partition_type in ["row_length", "row_lengths"]:
        out_part = ragged_tensor.row_lengths()
    elif partition_type in ["row_split", "row_splits"]:
        out_part = ragged_tensor.row_splits
    elif partition_type == "value_rowids":
        out_part = ragged_tensor.value_rowids()
    elif partition_type in ["row_limit", "row_limits"]:
        out_part = ragged_tensor.row_limits()
    elif partition_type in ["row_start", "row_starts"]:
        out_part = ragged_tensor.row_starts()
    else:
        raise TypeError("Unknown partition scheme, use: 'row_lengths', 'row_splits', ...")

    return [flat_tens, out_part]