code: def _full_row_lengths(
      values: np.ndarray,
      row_lengths: list[Sequence[int]],
      shape: tuple[Union[int, None], ...],
  ) -> Iterable[Sequence[int]]:
      """Corrects `row_lengths` by adding the length of non-ambiguous rows.
  
      `row_lengths` only contain the lengths of the ambiguous (None) rows. If the
      last dimensions are non-ambiguous (int), we can complete them.
  
      Args:
        values: 1-dimension array with all the values to reshape.
        row_lengths: array of length of the unknown dimension.
        shape: target shape of the array containing None for unknown dimensions.
  
      Returns:
        The corrected row lengths in reversed order (left is the most outer
          dimension).
      """
      if shape and shape[-1] is None:
          return reversed(row_lengths)
      full_row_lengths: list[Sequence[int]] = []
      current_row_length = len(row_lengths) - 1
      for dim_length in reversed(shape):
          if dim_length is None:
              if current_row_length < 0:
                  return full_row_lengths
              full_row_lengths.append(row_lengths[current_row_length])
              current_row_length -= 1
          else:
              full_row_lengths.append(
                  [dim_length] * (len(values) // dim_length)
              )
      return full_row_lengths
  
imports: from __future__ import annotations
  import abc
  from collections.abc import Iterable, Mapping, Sequence
  import dataclasses
  import re
  from typing import Any, Union
  import numpy
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.features import feature
  from tensorflow_datasets.core.utils import dtype_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
  from tensorflow_datasets.proto import tf_example_pb2
  from tensorflow_datasets.proto import tf_feature_pb2
label_desc: Use image node_id 7 for calling a global function with example usage: _full_row_lengths(values, row_lengths, shape) and returns: full_row_lengths, reversed, full_row_lengths