code: def test_fitted_mahalanobis_score():
      """Test Mahalanobis detector score method.
  
      Test Mahalanobis detector that has been fitted on reference data but has not had a threshold
      inferred can still score data using the predict method. Test that it does not raise an error
      but does not return `threshold`, `p_value` and `is_outlier` values.
      """
      mahalanobis_detector = Mahalanobis()
      x_ref = np.random.randn(100, 2)
      mahalanobis_detector.fit(x_ref)
      x = np.array([[0, 10], [0.1, 0]])
      scores = mahalanobis_detector.score(x)
  
      y = mahalanobis_detector.predict(x)
      y = y["data"]
      assert y["instance_score"][0] > 5
      assert y["instance_score"][1] < 1
      assert all(y["instance_score"] == scores)
      assert not y["threshold_inferred"]
      assert y["threshold"] is None
      assert y["is_outlier"] is None
      assert y["p_value"] is None
  
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 3 for calling a global function with example usage: test_fitted_mahalanobis_score() without return types