code: def __init__(self, metric, higher_better=True):
      if not isinstance(metric, Metric):
          invalidInputError(
              len(inspect.signature(metric).parameters) == 2,
              "Please provide an instance of torchmetrics.Metric or"
              "a metric function with input (preds, targets).",
          )
      super().__init__(metric, higher_better)
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/openvino/pytorch/metric.py
imports: from bigdl.nano.utils.common import invalidInputError
  from ..core.metric import BaseOpenVINOMetric
  import torch
  from torchmetrics import Metric
  import inspect
label_desc: Use image node_id 1 to create a new PytorchOpenVINOMetric object from inherited base classes: BaseOpenVINOMetric with example: obj = PytorchOpenVINOMetric(metric, higher_better)