class_docstr: Wrapper for tf.data.Dataset to permit extensions.
class_docstr_tok: ["Wrapper","for","tf.data.Dataset","to","permit","extensions","."]
code: def one_hot(self, nclass: int):
      return self.map(
          lambda x: dict(
              image=x["image"], label=tf.one_hot(x["label"], nclass)
          )
      )
  
file_path: privacy/research/mi_lira_2021/dataset.py
imports: from typing import Callable, Optional, Tuple, List
  import numpy
  import tensorflow
label_desc: Use image node_id 9 for calling the DataSet obj's underlying member method code with example usage: obj.one_hot(nclass) and returns: self