docstr: Fits the detector
  
  Parameters
  ----------
  x_ref
      The Dataset tensor.
docstr_tok: ["Fits","the","detector","Parameters","--","--","--","--","--","x_ref","The","Dataset","tensor","."]
code: def fit(self, x_ref: torch.Tensor):
      """Fits the detector
  
      Parameters
      ----------
      x_ref
          The Dataset tensor.
      """
      self.x_ref = x_ref
      self._set_fitted()
  
file_path: alibi-detect/alibi_detect/od/pytorch/knn.py
imports: from typing import Optional, Union, List, Tuple
  import numpy
  import torch
  from alibi_detect.od.pytorch.ensemble import Ensembler
  from alibi_detect.od.pytorch.base import TorchOutlierDetector
  from alibi_detect.utils._types import TorchDeviceType
label_desc: Use image node_id 4 for calling the KNNTorch obj's underlying member method code with example usage: obj.fit(x_ref) without return types