class_docstr: Logical functions stream generator.
  
  Make a toy dataset with three labels that represent the logical
  functions: `OR`, `XOR`, `AND` (functions of the 2D input).
  
  Data is generated in 'tiles' which contain the complete set of
  logical operations results. The tiles are repeated `n_tiles` times.
  Optionally, the generated data can be shuffled.
  
  Parameters
  ----------
  n_tiles
      Number of tiles to generate.
  shuffle
      If set, generated data will be shuffled.
  seed
      Random seed for reproducibility.
  
  Examples
  --------
  >>> from river.datasets import synth
  
  >>> dataset = synth.Logical(n_tiles=2, shuffle=True, seed=42)
  
  >>> for x, y in dataset.take(5):
  ...     print(x, y)
  {'A': 1, 'B': 1} {'OR': 1, 'XOR': 0, 'AND': 1}
  {'A': 0, 'B': 0} {'OR': 0, 'XOR': 0, 'AND': 0}
  {'A': 1, 'B': 0} {'OR': 1, 'XOR': 1, 'AND': 0}
  {'A': 1, 'B': 1} {'OR': 1, 'XOR': 0, 'AND': 1}
  {'A': 1, 'B': 0} {'OR': 1, 'XOR': 1, 'AND': 0}
code: def __iter__(self):
      self._rng = np.random.default_rng(self.seed)
  
      X, Y = self._make_logical(
          n_tiles=self.n_tiles, shuffle=self.shuffle
      )
  
      for xi, yi in itertools.zip_longest(
          X, Y if hasattr(Y, "__iter__") else []
      ):
          yield dict(zip(self.feature_names, xi)), dict(
              zip(self.target_names, yi)
          )
  
file_path: river/river/datasets/synth/logical.py
imports: from __future__ import annotations
  import itertools
  import numpy
  from river import datasets
label_desc: Use image node_id 2 for calling the Logical obj's underlying member method code with example usage: obj.__iter__() without return types