class_docstr: Iterable which can be called multiple times.
class_docstr_tok: ["Iterable","which","can","be","called","multiple","times","."]
docstr: Dataset length.
docstr_tok: ["Dataset","length","."]
code: def __len__(self) -> int:
      """Dataset length."""
      if isinstance(self._ds, tf.data.Dataset):
          return len(self._ds)
      else:
          raise TypeError(
              "__len__() is not supported for `tfds.as_numpy` datasets "
              "created in graph mode."
          )
  
imports: from __future__ import annotations
  import collections.abc
  import functools
  import typing
  from typing import Any, Callable, Iterable, Iterator, Union
  from etils import enp
  from etils.etree import nest
  import numpy
  from tensorflow_datasets.core import logging
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils import tree_utils
  from tensorflow_datasets.core.utils import type_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 2 for calling the _IterableDataset obj's underlying member method code with example usage: obj.__len__() and returns: len