class_docstr: Build a tf.data.Dataset object out of Instruction instance(s).
  
  This class should not typically be exposed to the TFDS user.
class_docstr_tok: ["Build","a","tf.data.Dataset","object","out","of","Instruction","instance","(","s",")",".","This","class","should","not","typically","be","exposed","to","the","TFDS","user","."]
docstr: Returns tf.data.Dataset instance(s).
  
  Args:
    instructions (ReadInstruction, List[], Dict[]): instruction(s) to read.
      Instructions can be string and will then be passed to the Instruction
      constructor as it.
    split_infos: the available splits for dataset.
    read_config: `tfds.ReadConfig`, the input pipeline options
    shuffle_files (bool): If True, input files are shuffled before being read.
    disable_shuffling: Specifies if the dataset being read has shuffling
      disabled.
    decode_fn: Eventual additional processing to apply to the example after
      deserialization.
  
  Returns:
     a single tf.data.Dataset instance if instruction is a single
     ReadInstruction instance. Otherwise a dict/list of tf.data.Dataset
     corresponding to given instructions param shape.
docstr_tok: ["Returns","tf.data.Dataset","instance","(","s",")",".","Args",":","instructions","(","ReadInstruction",",","List","[","]",",","Dict","[","]",")",":","instruction","(","s",")","to","read",".","Instructions","can","be","string","and","will","then","be","passed","to","the","Instruction","constructor","as","it",".","split_infos",":","the","available","splits","for","dataset",".","read_config",":","`","tfds.ReadConfig","`",",","the","input","pipeline","options","shuffle_files","(","bool",")",":","If","True",",","input","files","are","shuffled","before","being","read",".","disable_shuffling",":","Specifies","if","the","dataset","being","read","has","shuffling","disabled",".","decode_fn",":","Eventual","additional","processing","to","apply","to","the","example","after","deserialization",".","Returns",":","a","single","tf.data.Dataset","instance","if","instruction","is","a","single","ReadInstruction","instance",".","Otherwise","a","dict\/list","of","tf.data.Dataset","corresponding","to","given","instructions","param","shape","."]
code: def read(
      self,
      *,
      instructions: Tree[splits_lib.SplitArg],
      split_infos: List[splits_lib.SplitInfo],
      read_config: read_config_lib.ReadConfig,
      shuffle_files: bool,
      disable_shuffling: bool = False,
      decode_fn: Optional[DecodeFn] = None,
  ) -> Tree[tf.data.Dataset]:
      """Returns tf.data.Dataset instance(s).
  
      Args:
        instructions (ReadInstruction, List[], Dict[]): instruction(s) to read.
          Instructions can be string and will then be passed to the Instruction
          constructor as it.
        split_infos: the available splits for dataset.
        read_config: `tfds.ReadConfig`, the input pipeline options
        shuffle_files (bool): If True, input files are shuffled before being read.
        disable_shuffling: Specifies if the dataset being read has shuffling
          disabled.
        decode_fn: Eventual additional processing to apply to the example after
          deserialization.
  
      Returns:
         a single tf.data.Dataset instance if instruction is a single
         ReadInstruction instance. Otherwise a dict/list of tf.data.Dataset
         corresponding to given instructions param shape.
      """
  
      splits_dict = splits_lib.SplitDict(split_infos=split_infos)
  
      def _read_instruction_to_ds(instruction):
          file_instructions = splits_dict[instruction].file_instructions
          return self.read_files(
              file_instructions,
              read_config=read_config,
              shuffle_files=shuffle_files,
              disable_shuffling=disable_shuffling,
              decode_fn=decode_fn,
          )
  
      return tree_utils.map_structure(
          _read_instruction_to_ds, instructions
      )
  
imports: from __future__ import annotations
  import functools
  import os
  import re
  from typing import Any, Callable, List, NamedTuple, Optional, Sequence
  from absl import logging
  import numpy
  from tensorflow_datasets.core import example_parser
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import splits
  from tensorflow_datasets.core import tf_compat
  from tensorflow_datasets.core import utils
  from tensorflow_datasets.core.utils import file_utils
  from tensorflow_datasets.core.utils import read_config
  from tensorflow_datasets.core.utils import shard_utils
  from tensorflow_datasets.core.utils import tree_utils
  from tensorflow_datasets.core.utils.lazy_imports_utils import tensorflow
label_desc: Use image node_id 2 for calling the Reader obj's underlying member method code with example usage: obj.read() and returns: tree_utils, self