code: def evaluation(
      ctx: Context,
      role: Role,
      input_data: cpn.dataframe_inputs(roles=[GUEST, HOST]),
      default_eval_setting: cpn.parameter(
          type=string_choice(choice=["binary", "multi", "regression"]),
          default="binary",
          optional=True,
      ),
      metrics: cpn.parameter(type=list, default=None, optional=True),
      predict_column_name: cpn.parameter(
          type=str,
          default=None,
          optional=True,
          desc="predict data column name, if None(default), will use \
                                          'predict_score' in the input dataframe when the default setting are binary and regression, \
                                          and use 'predict_result' if default setting is multi",
      ),
      label_column_name: cpn.parameter(
          type=str,
          default=None,
          optional=True,
          desc="label data column namem if None(default), \
                                       will use 'label' in the input dataframe",
      ),
  ):
      if role.is_arbiter:
          return
      else:
          if metrics is not None:
              metrics_ensemble = get_specified_metrics(metrics)
              predict_col = (
                  predict_column_name
                  if predict_column_name is not None
                  else PREDICT_SCORE
              )
              label_col = (
                  label_column_name
                  if label_column_name is not None
                  else LABEL
              )
          else:
              if default_eval_setting == MULTI:
                  metrics_ensemble = get_multi_metrics()
                  predict_col = (
                      predict_column_name
                      if predict_column_name is not None
                      else PREDICT_RESULT
                  )
                  label_col = (
                      label_column_name
                      if label_column_name is not None
                      else LABEL
                  )
              else:
                  if default_eval_setting == BINARY:
                      metrics_ensemble = get_binary_metrics()
                  elif default_eval_setting == REGRESSION:
                      metrics_ensemble = get_regression_metrics()
                  else:
                      raise ValueError(
                          "default_eval_setting should be one of binary, multi, regression, got {}"
                      )
                  predict_col = (
                      predict_column_name
                      if predict_column_name is not None
                      else PREDICT_SCORE
                  )
                  label_col = (
                      label_column_name
                      if label_column_name is not None
                      else LABEL
                  )
  
          df_list = [_input.read() for _input in input_data]
          task_names = [
              _input.artifact.metadata.source.task_name
              for _input in input_data
          ]
          eval_rs = {}
          logger.info("components names are {}".format(task_names))
          for name, df in zip(task_names, df_list):
              rs_ = evaluate(
                  df, metrics_ensemble, predict_col, label_col
              )
              eval_rs[name] = rs_
  
      ctx.metrics.log_metrics(
          eval_rs, name="evaluation", type="evaluation"
      )
  
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 2 for calling a global function with example usage: evaluation(ctx, role, input_data, default_eval_setting, metrics, predict_column_name, label_column_name) without return types