code: def evaluate(pred):
      pred = pred.rank(pct=True)  # transform into percentiles
      score = pred.score
      label = pred.label
      diff = score - label
      MSE = (diff**2).mean()
      MAE = (diff.abs()).mean()
      IC = score.corr(label)
      return {"MSE": MSE, "MAE": MAE, "IC": IC}
  
imports: import os
  import copy
  import math
  import json
  import collections
  import numpy
  import pandas
  import torch
  import torch.nn
  import torch.optim
  import torch.nn.functional
  from tqdm import tqdm
  from qlib.utils import get_or_create_path
  from qlib.log import get_module_logger
  from qlib.model.base import Model
label_desc: Use image node_id 1 for calling a global function with example usage: evaluate(pred) and returns: dict