class_docstr: Track the min and max values of the observations in each batch.
code: def __init__(self, **kwargs) -> None:
      super().__init__(**kwargs)
      self.add_state(
          "min", torch.tensor(float("inf")), persistent=True
      )  # pylint: disable=not-callable
      self.add_state(
          "max", torch.tensor(float("-inf")), persistent=True
      )  # pylint: disable=not-callable
  
      self.min = torch.tensor(
          float("inf")
      )  # pylint: disable=not-callable
      self.max = torch.tensor(float("-inf"))
  
file_path: anomalib/src/anomalib/utils/metrics/min_max.py
imports: from __future__ import annotations
  import torch
  from torch import Tensor
  from torchmetrics import Metric
label_desc: Use image node_id 1 to create a new MinMax object from inherited base classes: Metric with example: obj = MinMax()