class_docstr: A pool-based active learner in which a pool holds all available unlabeled data.
  
  It uses a classifier, a query strategy and manages the mutually exclusive partition over the
  whole training data into labeled and unlabeled.
  
  Parameters
  ----------
  clf_factory : small_text.classifiers.factories.AbstractClassifierFactory
      A factory responsible for creating new classifier instances.
  query_strategy : small_text.query_strategies.QueryStrategy
      Query strategy which is responsible for selecting instances during a `query()` call.
  dataset : ~small_text.data.datasets.Dataset
      A training dataset that is supported by the underlying classifier.
  reuse_model : bool, default=False
      Reuses the previous model during retraining (if a previous model exists),
      otherwise creates a new model for each retraining.
  
  Attributes
  ----------
  indices_labeled : numpy.ndarray
      Indices of instances (relative to `self.x_train`) constituting the labeled pool.
  indices_ignored : numpy.ndarray or scipy.sparse.csr_matrix
      Indices of instances (relative to `self.x_train`) which have been ignored,
      i.e. which will never be returned by a query.
  y : numpy.ndarray or scipy.sparse.csr_matrix
      Labels for the the current labeled pool. Each tuple `(x_indices_labeled[i], y[i])`
      represents one labeled sample.
  indices_queried : numpy.ndarray or None
      Queried indices returned by the last `query()` call, or `None` if no query has been
      executed yet.
  fit_kwargs : dict
      Keyword arguments that will be passed to the `fit()` call during `update()`.
docstr: Updates the label for the given x_index (with regard to `self.x_train`).
  
  Notes
  -----
  After adding labels the current model might not reflect the labeled data anymore.
  You should consider if a retraining is necessary when using this operation.
  Since retraining is often time-consuming, `retrain` is set to `False` by default.
  
  Parameters
  ----------
  index : int
      Data index (relative to `self.x_train`) for which the label should be updated.
  y : int or numpy.ndarray
      The new label(s) to be assigned for the sample at `self.x_indices_labeled[x_index]`.
  retrain : bool, default=False
      Retrains the model after the update if True.
  indices_validation : numpy.ndarray, default=None
      The given indices (relative to `self.x_indices_labeled`) define a custom validation set
      if provided. This is only used if `retrain` is `True`.
docstr_tok: ["Updates","the","label","for","the","given","x_index","(","with","regard","to","`","self.x_train","`",")",".","Notes","--","--","-","After","adding","labels","the","current","model","might","not","reflect","the","labeled","data","anymore",".","You","should","consider","if","a","retraining","is","necessary","when","using","this","operation",".","Since","retraining","is","often","time-consuming",",","`","retrain","`","is","set","to","`","False","`","by","default",".","Parameters","--","--","--","--","--","index",":","int","Data","index","(","relative","to","`","self.x_train","`",")","for","which","the","label","should","be","updated",".","y",":","int","or","numpy.ndarray","The","new","label","(","s",")","to","be","assigned","for","the","sample","at","`","self.x_indices_labeled","[","x_index","]","`",".","retrain",":","bool",",","default=False","Retrains","the","model","after","the","update","if","True",".","indices_validation",":","numpy.ndarray",",","default=None","The","given","indices","(","relative","to","`","self.x_indices_labeled","`",")","define","a","custom","validation","set","if","provided",".","This","is","only","used","if","`","retrain","`","is","`","True","`","."]
code: def update_label_at(
      self, index, y, retrain=False, indices_validation=None
  ):
      """Updates the label for the given x_index (with regard to `self.x_train`).
  
      Notes
      -----
      After adding labels the current model might not reflect the labeled data anymore.
      You should consider if a retraining is necessary when using this operation.
      Since retraining is often time-consuming, `retrain` is set to `False` by default.
  
      Parameters
      ----------
      index : int
          Data index (relative to `self.x_train`) for which the label should be updated.
      y : int or numpy.ndarray
          The new label(s) to be assigned for the sample at `self.x_indices_labeled[x_index]`.
      retrain : bool, default=False
          Retrains the model after the update if True.
      indices_validation : numpy.ndarray, default=None
          The given indices (relative to `self.x_indices_labeled`) define a custom validation set
          if provided. This is only used if `retrain` is `True`.
      """
      position = self._index_to_position[index]
      self.y[position] = y
  
      if retrain:
          self._retrain(indices_validation=indices_validation)
  
imports: import numpy
  from abc import ABC, abstractmethod
  from pathlib import Path
  from scipy.sparse import csr_matrix
  from small_text.base import LABEL_IGNORED
  from small_text.exceptions import LearnerNotInitializedException
  from small_text.utils.data import list_length
  from small_text.utils.labels import concatenate, get_ignored_labels_mask, remove_by_index
  from small_text.version import __version__
label_desc: Use image node_id 5 for calling the PoolBasedActiveLearner obj's underlying member method code with example usage: obj.update_label_at(index, y, retrain, indices_validation) without return types