class_docstr: A multi-output model that arranges classifiers into a chain.
  
  This will create one model per output. The prediction of the first output will be used as a
  feature in the second model. The prediction for the second output will be used as a feature
  for the third model, etc. This "chain model" is therefore capable of capturing dependencies
  between outputs.
  
  Parameters
  ----------
  model
      A classifier model used for each label.
  order
      A list with the targets order in which to construct the chain. If `None` then the order
      will be inferred from the order of the keys in the target.
  
  Examples
  --------
  
  >>> from river import feature_selection
  >>> from river import linear_model
  >>> from river import metrics
  >>> from river import multioutput
  >>> from river import preprocessing
  >>> from river import stream
  >>> from sklearn import datasets
  
  >>> dataset = stream.iter_sklearn_dataset(
  ...     dataset=datasets.fetch_openml('yeast', version=4, parser='auto', as_frame=False),
  ...     shuffle=True,
  ...     seed=42
  ... )
  
  >>> model = feature_selection.VarianceThreshold(threshold=0.01)
  >>> model |= preprocessing.StandardScaler()
  >>> model |= multioutput.ClassifierChain(
  ...     model=linear_model.LogisticRegression(),
  ...     order=list(range(14))
  ... )
  
  >>> metric = metrics.multioutput.MicroAverage(metrics.Jaccard())
  
  >>> for x, y in dataset:
  ...     # Convert y values to booleans
  ...     y = {i: yi == 'TRUE' for i, yi in y.items()}
  ...     y_pred = model.predict_one(x)
  ...     metric.update(y, y_pred)
  ...     model.learn_one(x, y)
  
  >>> metric
  MicroAverage(Jaccard): 41.81%
  
  References
  ----------
  [^1]: [Multi-Output Chain Models and their Application in Data Streams](https://jmread.github.io/talks/2019_03_08-Imperial_Stats_Seminar.pdf)
code: def __init__(self, model: base.Classifier, order: list | None = None):
      super().__init__(model, order)
  
imports: from __future__ import annotations
  import collections
  import copy
  import functools
  import random
  from river import base, linear_model
  from river.utils.math import minkowski_distance, prod
label_desc: Use image node_id 1 to create a new ClassifierChain object from inherited base classes: BaseChain, base with example: obj = ClassifierChain(model, order)