code: def __init__(
      self, metric, *, index=None, pred_index=None, true_index=None
  ):
      super().__init__()
  
      if isinstance(metric, str):
          metric = get_metric(metric)
      names, metric = get_names_of_metric(metric)
      metric = convert_decomposable_metric_to_object(metric, names)
  
      self.__name__ = names
      self.metric = metric
  
      if index is not None and (
          pred_index is not None or true_index is not None
      ):
          raise ValueError(
              "'pred_index' and 'true_index' arguments should should not be used with the 'index argument."
          )
      if index is not None:
          self.pred_index = index
          self.true_index = index
      else:
          self.pred_index = pred_index
          self.true_index = true_index
  
file_path: poutyne/poutyne/framework/metrics/metric_argument_indexing.py
imports: from poutyne.framework.metrics.base import Metric
  from poutyne.framework.metrics.decomposable import convert_decomposable_metric_to_object
  from poutyne.framework.metrics.metrics_registering import get_metric
  from poutyne.framework.metrics.utils import get_names_of_metric
label_desc: Use image node_id 1 to create a new IndexedArgumentMetric object from inherited base classes: Metric with example: obj = IndexedArgumentMetric(metric)