code: def make_mahalanobis_detector():
      mahalanobis_detector = Mahalanobis()
      x_ref = np.random.randn(100, 2)
      mahalanobis_detector.fit(x_ref)
      mahalanobis_detector.infer_threshold(x_ref, 0.1)
      return mahalanobis_detector
  
file_path: alibi-detect/alibi_detect/od/tests/test__mahalanobis/test__mahalanobis.py
imports: import pytest
  import numpy
  import torch
  from alibi_detect.od._mahalanobis import Mahalanobis
  from alibi_detect.exceptions import NotFittedError
  from sklearn.datasets import make_moons
label_desc: Use image node_id 1 for calling a global function with example usage: make_mahalanobis_detector() and returns: mahalanobis_detector