code: def cv(
      ctx: "Context",
      role: Role,
      num_fold: cpn.parameter(
          type=params.conint(gt=1), desc="parameter", optional=False
      ),
      dataframe_input: cpn.dataframe_input(roles=[GUEST, HOST]),
      json_model_outputs: cpn.json_model_outputs(roles=[GUEST, HOST]),
      dataframe_outputs: cpn.dataframe_outputs(roles=[GUEST, HOST]),
  ):
      # split data
      for cv_ctx, (
          train_data,
          validata_data,
      ) in ctx.on_cross_validations.ctxs_zip(
          split_data(dataframe_input.read(), num_fold)
      ):
          # train model
          model = FakeTrainer()
          model.fit(cv_ctx, train_data=train_data)
          # predict model
          predict_result = model.predict(
              cv_ctx, validata_data=validata_data
          )
          # evaluate model
          evaluation_result = fake_evaluation(
              cv_ctx, predict_result=predict_result
          )
          next(json_model_outputs).write(
              data=model.get_model(), metadata=evaluation_result
          )
          cv_ctx.metrics.log_auc("fold_auc", evaluation_result["auc"])
          cv_ctx.metrics.log_roc("fold_roc", [0.1, 0.2, 0.3, 0.4, 0.5])
          next(dataframe_outputs).write(df=predict_result)
  
file_path: FATE/python/fate/components/components/cross_validation_test.py
imports: import logging
  import typing
  from fate.components.core import ARBITER, GUEST, HOST, Role, cpn, params
label_desc: Use image node_id 2 for calling a global function with example usage: cv(ctx, role, num_fold, dataframe_input, json_model_outputs, dataframe_outputs) without return types