class_docstr: Randomizes data over a sliding window buffer of N batches.
  
  This increases the randomization of the data, which is useful if the
  batches were not in random order to start with.
docstr: Initializes a ShuffledInput instance.
  
  Args:
      child: child input reader to shuffle.
      n: If positive, shuffle input over this many batches.
docstr_tok: ["Initializes","a","ShuffledInput","instance",".","Args",":","child",":","child","input","reader","to","shuffle",".","n",":","If","positive",",","shuffle","input","over","this","many","batches","."]
code: def __init__(self, child: InputReader, n: int = 0):
      """Initializes a ShuffledInput instance.
  
      Args:
          child: child input reader to shuffle.
          n: If positive, shuffle input over this many batches.
      """
      self.n = n
      self.child = child
      self.buffer = []
  
file_path: ray/rllib/offline/shuffled_input.py
imports: import logging
  import random
  from ray.rllib.offline.input_reader import InputReader
  from ray.rllib.utils.annotations import override, DeveloperAPI
  from ray.rllib.utils.typing import SampleBatchType
label_desc: Use image node_id 1 to create a new ShuffledInput object from inherited base classes: InputReader with example: obj = ShuffledInput(child, n)