code: def metric_definitions() -> List[Dict[str, str]]:
      """
      Returns the metric definitions to be used to collect performance measures
      from AWS Sagemaker.
      """
      # pylint: disable=no-member
      scalar_metrics = [
          {"Name": name, "Regex": _metric_regex(name)}
          for name in Performance.__dataclass_fields__  # type: ignore
      ]
      list_metrics = [
          {
              "Name": "train_loss",
              "Regex": f"'epoch_loss'={_FLOATING_POINT_REGEX}",
          },
          {
              "Name": "val_loss",
              "Regex": f"'validation_epoch_loss'={_FLOATING_POINT_REGEX}",
          },
          {
              "Name": "val_ncrps",
              "Regex": _metric_regex("val_ncrps"),
          },
      ]
      return scalar_metrics + list_metrics
  
label_desc: Use image node_id 1 for calling a global function with example usage: metric_definitions() and returns: unknown