class_docstr: Detector class.
  
  The detector is is a `nn.Module` subclass that, after fitting, performs a drift test when called and returns a score or p-value.
  
      Constructor Args:
              return_p_value (bool): If set, forward returns a p-value (estimate) instead of the raw test score.
docstr: Performs a statistical test for drift and returns the p-value.
  
  This method calls `predict_shift_from_features` under the hood, so you only need to override that when subclassing.
code: def compute_p_value(self, inputs: torch.Tensor) -> torch.Tensor:
      """Performs a statistical test for drift and returns the p-value.
  
      This method calls `predict_shift_from_features` under the hood, so you only need to override that when subclassing.
      """
      torchdrift.utils.check(
          self.base_outputs is not None,
          "Please call fit before compute_p_value",
      )
      _, p_value = self.predict_shift_from_features(
          self.base_outputs,
          inputs,
          compute_score=False,
          compute_p_value=True,
      )
      return p_value
  
file_path: TorchDrift/torchdrift/detectors/detector.py
imports: import torch
  import torchdrift.utils
label_desc: Use image node_id 4 for calling the Detector obj's underlying member method code with example usage: obj.compute_p_value(inputs) and returns: p_value