class_docstr: DiffMetric inherited from `SumMetric` by overidding its `update` method.
class_docstr_tok: ["DiffMetric","inherited","from","`","SumMetric","`","by","overidding","its","`","update","`","method","."]
docstr: Update state.
docstr_tok: ["Update","state","."]
code: def update(self, value):
      """Update state."""
      super().update(-value)
  
imports: from unittest import mock
  import torch
  from lightning_utilities import module_available
  from torch import tensor
  from torch.nn import Linear
  from torchmetrics import MetricCollection
  from torchmetrics.aggregation import SumMetric
  from torchmetrics.classification import BinaryAccuracy, BinaryAveragePrecision
  from torchmetrics.regression import MeanSquaredError
  from torchmetrics.wrappers import MultitaskWrapper
  from integrations.helpers import no_warning_call
  from integrations.lightning.boring_model import BoringModel
label_desc: Use image node_id 1 for calling the DiffMetric obj's underlying member method code with example usage: obj.update(value) without return types