code: def get_metrics(model, x_original, x_adv_samples, y):
      model_accuracy_on_non_adversarial_samples, y_pred = evaluate(
          model, x_original, y
      )
      model_accuracy_on_adversarial_samples, y_pred_adv = evaluate(
          model, x_adv_samples, y
      )
  
      pert_metric = get_perturbation_metric(
          x_original, x_adv_samples, y_pred, y_pred_adv, ord=2
      )
      conf_metric = get_confidence_metric(y_pred, y_pred_adv)
  
      data = {
          "model accuracy on test data": float(
              model_accuracy_on_non_adversarial_samples
          ),
          "model accuracy on adversarial samples": float(
              model_accuracy_on_adversarial_samples
          ),
          "confidence reduced on correctly classified adv_samples": float(
              conf_metric
          ),
          "average perturbation on misclassified adv_samples": float(
              pert_metric
          ),
      }
      return data, y_pred, y_pred_adv
  
file_path: adversarial-robustness-toolbox/utils/mlops/kubeflow/robustness_evaluation_fgsm_pytorch/src/robustness_util.py
imports: import numpy
  import numpy.linalg
  import torch
  import torch.utils.data
  from torch.autograd import Variable
label_desc: Use image node_id 1 for calling a global function with example usage: get_metrics(model, x_original, x_adv_samples, y) and returns: data,  y_pred,  y_pred_adv