class_docstr: Optimal F1 Metric.
  
  Compute the optimal F1 score at the adaptive threshold, based on the F1 metric of the true labels and the
  predicted anomaly scores.
docstr: Update the precision-recall curve metric.
code: def update(
      self, preds: Tensor, target: Tensor, *args, **kwargs
  ) -> None:
      """Update the precision-recall curve metric."""
      del args, kwargs  # These variables are not used.
  
      self.precision_recall_curve.update(preds, target)
  
file_path: anomalib/src/anomalib/utils/metrics/optimal_f1.py
imports: import warnings
  import torch
  from torch import Tensor
  from torchmetrics import Metric, PrecisionRecallCurve
label_desc: Use image node_id 2 for calling the OptimalF1 obj's underlying member method code with example usage: obj.update(preds, target) without return types