class_docstr: Overlay on top of `csv.DictReader` which allows sampling.
class_docstr_tok: ["Overlay","on","top","of","`","csv.DictReader","`","which","allows","sampling","."]
code: def __next__(self):
      if self.line_num == 0:
          self.fieldnames
  
      row = next(self.reader)
  
      if self.fraction < 1:
          while self.rng.random() > self.fraction:
              row = next(self.reader)
  
      return dict(zip(self.fieldnames, row))
  
file_path: river/river/stream/iter_csv.py
imports: from __future__ import annotations
  import csv
  import datetime
  import random
  from ..None import base
  from .None import utils
label_desc: Use image node_id 2 for calling the DictReader obj's underlying member method code with example usage: obj.__next__() and returns: dict