code: def _get_feature(
      path: Tuple[str, ...],
      feature: features.FeatureConnector,
  ) -> Tuple[features.FeatureConnector, int]:
      """Recursively extracts the feature and sequence rank (plain, ragged, ...)."""
      sequence_rank = 0
  
      # Collapse the nested sequences
      while isinstance(feature, features.Sequence):
          # Subclasses like `Video` shouldn't be recursed into.
          # But sequence of dict like `TranslationVariableLanguages` should.
          # Currently, there is no good way for a composed sub-feature to only
          # display a single column instead of one per sub-feature.
          # So `MyFeature({'x': tf.int32, 'y': tf.bool})` will have 2 columns `x`
          # and `y`.
          if (
              type(feature) != features.Sequence and not path
          ):  # pylint: disable=unidiomatic-typecheck
              break
          sequence_rank += 1
          feature = (
              feature.feature
          )  # Extract inner feature  # pytype: disable=attribute-error
  
      if path:  # Has level deeper, recurse
          feature = typing.cast(features.FeaturesDict, feature)
          feature, nested_sequence_rank = _get_feature(
              path[1:], feature[path[0]]
          )  # pytype: disable=wrong-arg-types
          sequence_rank += nested_sequence_rank
  
      return feature, sequence_rank
  
file_path: datasets/tensorflow_datasets/core/as_dataframe.py
imports: from __future__ import annotations
  import dataclasses
  import typing
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from tensorflow_datasets.core import dataset_info
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import features
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core.utils import py_utils
  from tensorflow_datasets.core.utils import type_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import pandas
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: _get_feature(path, feature) and returns: feature,  sequence_rank