class_docstr: Callback that calculates metric results.
  Adds the results into the trial repository.
  
  .. seealso::
      :class:`BaseCallback`,
      :class:`MetaCallback`,
      :class:`EarlyStoppingCallback`,
      :class:`IfBestScore`,
      :class:`IfLastStep`,
      :class:`StepSaverCallback`,
      :class:`CallbackList`,
code: def __init__(
      self,
      name: str,
      metric_function: Callable[
          [ARG_Y_EXPECTED, ARG_Y_PREDICTD, OPTIONAL_ARG_CONTEXT],
          RETURNS_SCORE,
      ],
      higher_score_is_better: bool,
      log_metrics=True,
      pass_context_to_metric_function: bool = False,
  ):
      # TODO: make a dictionnary somewhere to store predefined metrics?
      self.name: str = name
      self.metric_function: Callable[
          [ARG_Y_EXPECTED, ARG_Y_PREDICTD, OPTIONAL_ARG_CONTEXT],
          RETURNS_SCORE,
      ] = metric_function
      self.higher_score_is_better = higher_score_is_better
      self.log_metrics = log_metrics
      self.pass_context_to_metric_function = (
          pass_context_to_metric_function
      )
  
imports: from abc import ABC, abstractmethod
  from typing import Callable, List, Optional
  from neuraxle.base import ExecutionContext
  from neuraxle.data_container import ARG_Y_EXPECTED, ARG_Y_PREDICTD, EvalEOTDACT
  from neuraxle.logging.warnings import warn_deprecated_class
  from neuraxle.metaopt.data.aggregates import MetricResults, TrialSplit
label_desc: Use image node_id 1 to create a new MetricCallback object from inherited base classes: BaseCallback with example: obj = MetricCallback(name, metric_function, higher_score_is_better, log_metrics, pass_context_to_metric_function)