docstr: Private method to preprocess a single test instance ready for _update_state.
  
  Parameters
  ----------
  x_t
      A single test instance to be preprocessed.
  
  Returns
  -------
  The preprocessed test instance `x_t`.
docstr_tok: ["Private","method","to","preprocess","a","single","test","instance","ready","for","_update_state",".","Parameters","--","--","--","--","--","x_t","A","single","test","instance","to","be","preprocessed",".","Returns","--","--","--","-","The","preprocessed","test","instance","`","x_t","`","."]
code: def _preprocess_xt(self, x_t: Union[np.ndarray, Any]) -> np.ndarray:
      """
      Private method to preprocess a single test instance ready for _update_state.
  
      Parameters
      ----------
      x_t
          A single test instance to be preprocessed.
  
      Returns
      -------
      The preprocessed test instance `x_t`.
      """
      # preprocess if necessary
      if self.preprocess_fn is not None:
          x_t = x_t[None, :] if isinstance(x_t, np.ndarray) else [x_t]
          x_t = self.preprocess_fn(x_t)[0]
      # Now check the final data is a 2D ndarray
      x_t = self._check_x(x_t)
      return x_t
  
imports: import logging
  import warnings
  from abc import abstractmethod
  from typing import Any, Callable, Dict, List, Optional, Union, Tuple, TYPE_CHECKING
  import numpy
  from alibi_detect.base import BaseDetector, concept_drift_dict
  from alibi_detect.cd.utils import get_input_shape
  from alibi_detect.utils.state import StateMixin
  from alibi_detect.utils._types import Literal
label_desc: Use image node_id 6 for calling the BaseUniDriftOnline obj's underlying member method code with example usage: obj._preprocess_xt(x_t) and returns: x_t