code: def evaluate(input_data, metrics, predict_col, label_col):
      data = input_data.as_pd_df()
      split_dict = split_dataframe_by_type(data)
      rs_dict = {}
      for name, df in split_dict.items():
          y_true = df[label_col]
          # in case is multi result, use tolist
          y_pred = df[predict_col]
          rs = metrics(predict=y_pred, label=y_true)
          rs_dict[name] = rs
  
      return rs_dict
  
file_path: FATE/python/fate/components/components/evaluation.py
imports: import logging
  from typing import Dict
  from fate.arch import Context
  import numpy
  import pandas
  from fate.arch import Context
  from fate.components.core import ARBITER, GUEST, HOST, Role, cpn
  from fate.components.core.params import string_choice
  from fate.ml.evaluation.tool import get_binary_metrics, get_multi_metrics, get_regression_metrics, get_specified_metrics
  from fate.ml.utils.predict_tools import PREDICT_SCORE, PREDICT_RESULT, LABEL
  from fate.components.components.utils.consts import BINARY, REGRESSION, MULTI
label_desc: Use image node_id 3 for calling a global function with example usage: evaluate(input_data, metrics, predict_col, label_col) and returns: rs_dict