class_docstr: Base class for query-by-committee setup.
  Args:
      learner_list: List of ActiveLearner objects to form committee.
      query_strategy: Function to query labels.
      on_transformed: Whether to transform samples with the pipeline defined by each learner's estimator
          when applying the query strategy.
docstr: Adds X and y to the known training data for each learner and retrains learners with the augmented dataset.
  Args:
      X: The new samples for which the labels are supplied by the expert.
      y: Labels corresponding to the new instances in X.
      bootstrap: If True, trains each learner on a bootstrapped set. Useful when building the ensemble by bagging.
      only_new: If True, the model is retrained using only X and y, ignoring the previously provided examples.
      **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
docstr_tok: ["Adds","X","and","y","to","the","known","training","data","for","each","learner","and","retrains","learners","with","the","augmented","dataset",".","Args",":","X",":","The","new","samples","for","which","the","labels","are","supplied","by","the","expert",".","y",":","Labels","corresponding","to","the","new","instances","in","X.","bootstrap",":","If","True",",","trains","each","learner","on","a","bootstrapped","set",".","Useful","when","building","the","ensemble","by","bagging",".","only_new",":","If","True",",","the","model","is","retrained","using","only","X","and","y",",","ignoring","the","previously","provided","examples",".","*","*","fit_kwargs",":","Keyword","arguments","to","be","passed","to","the","fit","method","of","the","predictor","."]
code: def teach(
      self,
      X: modALinput,
      y: modALinput,
      bootstrap: bool = False,
      only_new: bool = False,
      **fit_kwargs,
  ) -> None:
      """
      Adds X and y to the known training data for each learner and retrains learners with the augmented dataset.
      Args:
          X: The new samples for which the labels are supplied by the expert.
          y: Labels corresponding to the new instances in X.
          bootstrap: If True, trains each learner on a bootstrapped set. Useful when building the ensemble by bagging.
          only_new: If True, the model is retrained using only X and y, ignoring the previously provided examples.
          **fit_kwargs: Keyword arguments to be passed to the fit method of the predictor.
      """
      self._add_training_data(X, y)
      if not only_new:
          self._fit_to_known(bootstrap=bootstrap, **fit_kwargs)
      else:
          self._fit_on_new(X, y, bootstrap=bootstrap, **fit_kwargs)
  
imports: import abc
  import sys
  import warnings
  from typing import Any, Callable, Iterator, List, Tuple, Union
  import numpy
  import scipy.sparse
  from modAL.utils.data import data_hstack, modALinput, retrieve_rows
  from sklearn.base import BaseEstimator
  from sklearn.ensemble._base import _BaseHeterogeneousEnsemble
  from sklearn.pipeline import Pipeline
label_desc: Use image node_id 11 for calling the BaseCommittee obj's underlying member method code with example usage: obj.teach(X, y, bootstrap, only_new) without return types