code: def load_detector(
      filepath: Union[str, os.PathLike], **kwargs
  ) -> Union[Detector, ConfigurableDetector]:
      """
      Load outlier, drift or adversarial detector.
  
      Parameters
      ----------
      filepath
          Load directory.
  
      Returns
      -------
      Loaded outlier or adversarial detector object.
      """
      warnings.warn(
          "This function has been moved to alibi_detect.saving.load_detector()."
          "This legacy link will be removed in a future version",
          DeprecationWarning,
      )
      return _load_detector(filepath, **kwargs)
  
imports: from alibi_detect.saving import load_detector, save_detector
  from alibi_detect.base import ConfigurableDetector, Detector
  from typing import Union
  import warnings
  import os
label_desc: Use image node_id 2 for calling a global function with example usage: load_detector(filepath) and returns: _load_detector