code: def _extract_row_lengths(
      features: Mapping[str, tf_feature_pb2.Feature],
      feature_name: str,
  ) -> list[Sequence[int]]:
      """Extracts all existing row lengths from the `features`."""
      i = 0
      row_lengths: list[Sequence[int]] = []
      while True:
          row_length_key = f"{feature_name}/ragged_row_lengths_{i}"
          if row_length_key not in features:
              break
          row_lengths.append(features[row_length_key].int64_list.value)
          i += 1
      return 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 5 for calling a global function with example usage: _extract_row_lengths(features, feature_name) and returns: row_lengths