class_docstr: Monitoring metric object. Supports two types of reduction: mean and sum.
code: def compute_metric(
      self,
      y_pred: Union[torch.Tensor, np.ndarray],
      y_true: Union[torch.Tensor, np.ndarray],
  ):
      pass
  
imports: import torch
  import numpy
  from enum import Enum
  from abc import ABC, abstractmethod
  from typing import Dict, Union, Callable
label_desc: Use image node_id 2 for calling the Metric obj's underlying member method code with example usage: obj.compute_metric(y_pred, y_true) without return types