class_docstr: Class wrapping a dataset of obfuscated images.
  
  This class returns a dataset of tf.train.Examples, each containing the
  following fields:
  - 'image_{obf}': The obfuscated image, where obf is each of the valid
    obfuscations. The images have shapes (height, width, 3).
  - 'label': The label of the respective input samples.
  
  Attributes:
    dataset: An object from the data_utils.Dataset enumeration, identifying the
      dataset from which the data is derived.
    obfuscation_list: Obfuscations to be used in our dataset. Currently only
      supports a list with one element (one obfuscation).
class_docstr_tok: ["Class","wrapping","a","dataset","of","obfuscated","images",".","This","class","returns","a","dataset","of","tf.train.Examples",",","each","containing","the","following","fields",":","-","'image_","{","obf","}","'",":","The","obfuscated","image",",","where","obf","is","each","of","the","valid","obfuscations",".","The","images","have","shapes","(","height",",","width",",","3",")",".","-","'label","'",":","The","label","of","the","respective","input","samples",".","Attributes",":","dataset",":","An","object","from","the","data_utils.Dataset","enumeration",",","identifying","the","dataset","from","which","the","data","is","derived",".","obfuscation_list",":","Obfuscations","to","be","used","in","our","dataset",".","Currently","only","supports","a","list","with","one","element","(","one","obfuscation",")","."]
code: def _read_dataset(
      self, context: Optional[tf.distribute.InputContext] = None
  ) -> tf.data.Dataset:
      obfuscation = self.obfuscation_list[0]
      split = data_utils.Split.from_string(self.split)
      base_subset = data_utils.get_subsets(split, [obfuscation])[0]
  
      input_pipeline_id = 0
      num_input_pipelines = 1
      if context:
          input_pipeline_id = context.input_pipeline_id
          num_input_pipelines = context.num_input_pipelines
  
      start, end = data_utils.shard(
          self.dataset,
          split,
          obfuscation=base_subset,
          shard_index=input_pipeline_id,
          num_shards=num_input_pipelines,
      )
  
      base_subset = tfds.core.ReadInstruction(
          base_subset, from_=start, to=end, unit="abs"
      )
  
      return_dataset = tfds.load(
          self.dataset.value, data_dir=self.data_dir, split=base_subset
      )
      return return_dataset
  
imports: import abc
  from typing import Optional, Sequence, Tuple
  from meo.mlp_baseline import data_utils
  import tensorflow
  import tensorflow_datasets
label_desc: Use image node_id 2 for calling the ObfuscatedImageDataset obj's underlying member method code with example usage: obj._read_dataset(context) and returns: return_dataset