code: def max_score(
      classifier: OneVsRestClassifier,
      X_pool: modALinput,
      n_instances: int = 1,
      random_tie_break: bool = 1,
  ) -> np.ndarray:
      """
      MaxScore query strategy for multilabel classification.
  
      For more details on this query strategy, see
      Esuli and Sebastiani., Active Learning Strategies for Multi-Label Text Classification
      (http://dx.doi.org/10.1007/978-3-642-00958-7_12)
  
      Args:
          classifier: The multilabel classifier for which the labels are to be queried.
          X_pool: The pool of samples to query from.
          random_tie_break: If True, shuffles utility scores to randomize the order. This
              can be used to break the tie when the highest utility score is not unique.
  
      Returns:
          The index of the instance from X_pool chosen to be labelled.
          The classwise maximum metric of the chosen instances.
  
      """
  
      classwise_confidence = classifier.predict_proba(X_pool)
      classwise_predictions = classifier.predict(X_pool)
      classwise_scores = classwise_confidence * (
          classwise_predictions - 1 / 2
      )
      classwise_max = np.max(classwise_scores, axis=1)
  
      if not random_tie_break:
          return multi_argmax(classwise_max, n_instances)
  
      return shuffled_argmax(classwise_max, n_instances)
  
file_path: modAL/modAL/multilabel.py
imports: from typing import Optional
  import numpy
  from sklearn.multiclass import OneVsRestClassifier
  from modAL.models import ActiveLearner
  from modAL.utils.data import modALinput
  from modAL.utils.selection import multi_argmax, multi_argmin, shuffled_argmax, shuffled_argmin
label_desc: Use image node_id 7 for calling a global function with example usage: max_score(classifier, X_pool, n_instances, random_tie_break) and returns: shuffled_argmax, multi_argmax