class_docstr: Adapter that handles python generators and iterators.
class_docstr_tok: ["Adapter","that","handles","python","generators","and","iterators","."]
docstr: Standardizes a batch output by a generator.
docstr_tok: ["Standardizes","a","batch","output","by","a","generator","."]
code: def _standardize_batch(self, data):
      """Standardizes a batch output by a generator."""
      # Removes `None`s.
      x, y, sample_weight = unpack_x_y_sample_weight(data)
      data = pack_x_y_sample_weight(x, y, sample_weight)
  
      return data
  
file_path: elegy/elegy/data/generator_adapter.py
imports: import itertools
  import typing
  from .data_adapter import DataAdapter
  from .utils import assert_not_namedtuple, flatten, is_none_or_empty, pack_x_y_sample_weight, unpack_x_y_sample_weight
label_desc: Use image node_id 3 for calling the GeneratorDataAdapter obj's underlying member method code with example usage: obj._standardize_batch(data) and returns: data