code: def test_fitted_PCA_score(detector):
      """Test Linear and Kernel PCA detector score method.
  
      Test Linear and Kernel PCA 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
      and does not return `threshold`, `p_value` and `is_outlier` values.
      """
      pca_detector = detector()
      x_ref = np.random.randn(100, 3)
      pca_detector.fit(x_ref)
      x = np.array([[0, 10, 0], [0.1, 0, 0]])
      y = pca_detector.predict(x)
      y = y["data"]
      assert y["instance_score"][0] > y["instance_score"][1]
      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__pca/test__pca.py
imports: import pytest
  import numpy
  import torch
  from alibi_detect.utils.pytorch.kernels import GaussianRBF
  from alibi_detect.od._pca import PCA
  from alibi_detect.exceptions import NotFittedError
  from sklearn.datasets import make_moons
label_desc: Use image node_id 4 for calling a global function with example usage: test_fitted_PCA_score(detector) without return types