class_docstr: Wrapper for tf.data.Dataset to permit extensions.
class_docstr_tok: ["Wrapper","for","tf.data.Dataset","to","permit","extensions","."]
code: def from_tfds(
      cls, dataset: tf.data.Dataset, image_shape: Tuple[int, int, int]
  ):
      d = dataset.enumerate()
      d = d.map(
          lambda index, x: dict(
              image=tf.cast(x["image"], tf.float32) / 127.5 - 1,
              label=x["label"],
              index=x,
          )
      )
      return cls(d, image_shape, parse_fn=None)
  
imports: import os
  from typing import Callable, Optional, Tuple, List, Iterable
  import numpy
  import tensorflow
  from absl import flags
label_desc: Use image node_id 4 for calling the DataSet obj's underlying member method code with example usage: obj.from_tfds(cls, dataset, image_shape) and returns: cls