code: def range(
      starts,
      limits=None,
      deltas=1,
      dtype=None,
      name=None,
      row_splits_dtype=dtypes.int64,
  ):
      """Returns a `RaggedTensor` containing the specified sequences of numbers.
  
      Each row of the returned `RaggedTensor` contains a single sequence:
  
      ```python
      ragged.range(starts, limits, deltas)[i] ==
          tf.range(starts[i], limits[i], deltas[i])
      ```
  
      If `start[i] < limits[i] and deltas[i] > 0`, then `output[i]` will be an
      empty list.  Similarly, if `start[i] > limits[i] and deltas[i] < 0`, then
      `output[i]` will be an empty list.  This behavior is consistent with the
      Python `range` function, but differs from the `tf.range` op, which returns
      an error for these cases.
  
      Examples:
  
      >>> tf.ragged.range([3, 5, 2]).to_list()
      [[0, 1, 2], [0, 1, 2, 3, 4], [0, 1]]
      >>> tf.ragged.range([0, 5, 8], [3, 3, 12]).to_list()
      [[0, 1, 2], [], [8, 9, 10, 11]]
      >>> tf.ragged.range([0, 5, 8], [3, 3, 12], 2).to_list()
      [[0, 2], [], [8, 10]]
  
      The input tensors `starts`, `limits`, and `deltas` may be scalars or vectors.
      The vector inputs must all have the same size.  Scalar inputs are broadcast
      to match the size of the vector inputs.
  
      Args:
        starts: Vector or scalar `Tensor`.  Specifies the first entry for each range
          if `limits` is not `None`; otherwise, specifies the range limits, and the
          first entries default to `0`.
        limits: Vector or scalar `Tensor`.  Specifies the exclusive upper limits for
          each range.
        deltas: Vector or scalar `Tensor`.  Specifies the increment for each range.
          Defaults to `1`.
        dtype: The type of the elements of the resulting tensor.  If not specified,
          then a value is chosen based on the other args.
        name: A name for the operation.
        row_splits_dtype: `dtype` for the returned `RaggedTensor`'s `row_splits`
          tensor.  One of `tf.int32` or `tf.int64`.
  
      Returns:
        A `RaggedTensor` of type `dtype` with `ragged_rank=1`.
      """
      row_splits_dtype = dtypes.as_dtype(row_splits_dtype)
      if limits is None:
          starts, limits = 0, starts
  
      with ops.name_scope(
          name, "RaggedRange", [starts, limits, deltas]
      ) as name:
          starts = ops.convert_to_tensor(
              starts, dtype=dtype, name="starts"
          )
          limits = ops.convert_to_tensor(
              limits, dtype=dtype, name="limits"
          )
          deltas = ops.convert_to_tensor(
              deltas, dtype=dtype, name="deltas"
          )
  
          # infer dtype if not explicitly provided
          if dtype is None:
              starts, limits, deltas = _infer_matching_dtype(
                  [starts, limits, deltas],
                  [
                      dtypes.int32,
                      dtypes.int64,
                      dtypes.float32,
                      dtypes.float64,
                  ],
              )
  
          result = gen_ragged_math_ops.ragged_range(
              starts,
              limits,
              deltas,
              Tsplits=row_splits_dtype,
              name=name,
          )
          return ragged_tensor.RaggedTensor.from_row_splits(
              result.rt_dense_values,
              result.rt_nested_splits,
              validate=False,
          )
  
imports: import functools
  import typing
  import numpy
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor
  from tensorflow.python.framework import tensor_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import check_ops
  from tensorflow.python.ops import gen_ragged_math_ops
  from tensorflow.python.ops import map_fn
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import nn_ops
  from tensorflow.python.ops.ragged import ragged_functional_ops
  from tensorflow.python.ops.ragged import ragged_tensor
  from tensorflow.python.ops.ragged import segment_id_ops
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 for calling a global function with example usage: range(starts, limits, deltas, dtype, name, row_splits_dtype) and returns: ragged_tensor