code: def test_lof_single_torchscript():
      lof_detector = make_lof_detector(k=5)
      ts_lof = torch.jit.script(lof_detector.backend)
      x = torch.tensor([[0, 10], [0, 0.1]])
  
      # test torchscripted single lof detector can be saved and loaded correctly.
      y = ts_lof(x)
      assert torch.all(y == torch.tensor([True, False]))
  
file_path: alibi-detect/alibi_detect/od/tests/test__lof/test__lof.py
imports: import pytest
  import numpy
  import torch
  from alibi_detect.od._lof import LOF
  from alibi_detect.od.pytorch.ensemble import AverageAggregator, TopKAggregator, MaxAggregator, MinAggregator, ShiftAndScaleNormalizer, PValNormalizer
  from alibi_detect.exceptions import NotFittedError, ThresholdNotInferredError
  from sklearn.datasets import make_moons
label_desc: Use image node_id 11 for calling a global function with example usage: test_lof_single_torchscript() without return types