class_docstr: DummyMetric class for testing composition component.
class_docstr_tok: ["DummyMetric","class","for","testing","composition","component","."]
code: def __init__(self, val_to_return) -> None:
      super().__init__()
      self.add_state("_num_updates", tensor(0), dist_reduce_fx="sum")
      self._val_to_return = val_to_return
  
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 1 to create a new DummyMetric object from inherited base classes: Metric with example: obj = DummyMetric(val_to_return)