class_docstr: Core abstraction in modAL.
  
  Args:
      estimator: The estimator to be used in the active learning loop.
      query_strategy: Function providing the query strategy for the active learning loop,
          for instance, modAL.uncertainty.uncertainty_sampling.
      force_all_finite: When True, forces all values of the data finite.
          When False, accepts np.nan and np.inf values.
      on_transformed: Whether to transform samples with the pipeline defined by the estimator
          when applying the query strategy.
      **fit_kwargs: keyword arguments.
  
  Attributes:
      estimator: The estimator to be used in the active learning loop.
      query_strategy: Function providing the query strategy for the active learning loop.
docstr: Finds the n_instances most informative point in the data provided by calling the query_strategy function.
  
  Args:
      X_pool: Pool of unlabeled instances to retrieve most informative instances from
      return_metrics: boolean to indicate, if the corresponding query metrics should be (not) returned
      *query_args: The arguments for the query strategy. For instance, in the case of
          :func:`~modAL.uncertainty.uncertainty_sampling`, it is the pool of samples from which the query strategy
          should choose instances to request labels.
      **query_kwargs: Keyword arguments for the query strategy function.
  
  Returns:
      Value of the query_strategy function. Should be the indices of the instances from the pool chosen to be
      labelled and the instances themselves. Can be different in other cases, for instance only the instance to be
      labelled upon query synthesis.
      query_metrics: returns also the corresponding metrics, if return_metrics == True
docstr_tok: ["Finds","the","n_instances","most","informative","point","in","the","data","provided","by","calling","the","query_strategy","function",".","Args",":","X_pool",":","Pool","of","unlabeled","instances","to","retrieve","most","informative","instances","from","return_metrics",":","boolean","to","indicate",",","if","the","corresponding","query","metrics","should","be","(","not",")","returned","*","query_args",":","The","arguments","for","the","query","strategy",".","For","instance",",","in","the","case","of",":","func",":","`","~modAL.uncertainty.uncertainty_sampling","`",",","it","is","the","pool","of","samples","from","which","the","query","strategy","should","choose","instances","to","request","labels",".","*","*","query_kwargs",":","Keyword","arguments","for","the","query","strategy","function",".","Returns",":","Value","of","the","query_strategy","function",".","Should","be","the","indices","of","the","instances","from","the","pool","chosen","to","be","labelled","and","the","instances","themselves",".","Can","be","different","in","other","cases",",","for","instance","only","the","instance","to","be","labelled","upon","query","synthesis",".","query_metrics",":","returns","also","the","corresponding","metrics",",","if","return_metrics","==","True"]
code: def query(
      self,
      X_pool,
      *query_args,
      return_metrics: bool = False,
      **query_kwargs,
  ) -> Union[Tuple, modALinput]:
      """
      Finds the n_instances most informative point in the data provided by calling the query_strategy function.
  
      Args:
          X_pool: Pool of unlabeled instances to retrieve most informative instances from
          return_metrics: boolean to indicate, if the corresponding query metrics should be (not) returned
          *query_args: The arguments for the query strategy. For instance, in the case of
              :func:`~modAL.uncertainty.uncertainty_sampling`, it is the pool of samples from which the query strategy
              should choose instances to request labels.
          **query_kwargs: Keyword arguments for the query strategy function.
  
      Returns:
          Value of the query_strategy function. Should be the indices of the instances from the pool chosen to be
          labelled and the instances themselves. Can be different in other cases, for instance only the instance to be
          labelled upon query synthesis.
          query_metrics: returns also the corresponding metrics, if return_metrics == True
      """
  
      try:
          query_result, query_metrics = self.query_strategy(
              self, X_pool, *query_args, **query_kwargs
          )
  
      except:
          query_metrics = None
          query_result = self.query_strategy(
              self, X_pool, *query_args, **query_kwargs
          )
  
      if return_metrics:
          if query_metrics is None:
              warnings.warn(
                  "The selected query strategy doesn't support return_metrics"
              )
          return (
              query_result,
              retrieve_rows(X_pool, query_result),
              query_metrics,
          )
      else:
          return query_result, retrieve_rows(X_pool, query_result)
  
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 7 for calling the BaseLearner obj's underlying member method code with example usage: obj.query(X_pool) and returns: query_result,  retrieve_rows,  query_metrics, query_result,  retrieve_rows