class_docstr: DummyMetric class for testing composition component.
class_docstr_tok: ["DummyMetric","class","for","testing","composition","component","."]
docstr: Compute state.
docstr_tok: ["Compute","state","."]
code: def update(self, *args: Any, **kwargs: Any) -> None:
      """Compute state."""
      self._num_updates += 1
  
imports: from operator import neg, pos
  from typing import Any
  import pytest
  import torch
  from torch import tensor
  from torchmetrics.metric import CompositionalMetric, Metric
label_desc: Use image node_id 2 for calling the DummyMetric obj's underlying member method code with example usage: obj.update() without return types