code: def predict(
      ctx,
      role: Role,
      test_data: cpn.dataframe_input(roles=[GUEST, HOST]),
      batch_size: cpn.parameter(
          type=params.conint(ge=-1),
          default=100,
          desc="batch size, "
          "value less or equals to 0 means full batch",
      ),
      threshold: cpn.parameter(
          type=params.confloat(ge=0.0, le=1.0),
          default=0.5,
          desc="predict threshold for binary data",
      ),
      predict_input_model: cpn.json_model_input(roles=[GUEST, HOST]),
      test_output_data: cpn.dataframe_output(roles=[GUEST, HOST]),
  ):
      if role.is_guest or role.is_host:  # is client
          client = HomoLRClient(
              batch_size=batch_size, threshold=threshold
          )
          model_input = predict_input_model.read()
          client.from_model(model_input)
          pred_rs = client.predict(ctx, test_data.read())
          pred_rs = add_dataset_type(pred_rs, consts.TEST_SET)
          test_output_data.write(pred_rs)
  
      elif role.is_arbiter:  # is server
          logger.info("arbiter skip predict")
  
file_path: FATE/python/fate/components/components/homo_lr.py
imports: import logging
  from fate.arch import Context
  from fate.ml.glm.homo.lr.client import HomoLRClient
  from fate.ml.glm.homo.lr.server import HomoLRServer
  from fate.components.core import ARBITER, GUEST, HOST, Role, cpn, params
  from fate.components.components.utils import consts
  from fate.ml.utils.model_io import ModelIO
  from fate.components.components.utils.tools import add_dataset_type
  from fate.arch.dataframe import DataFrame
label_desc: Use image node_id 3 for calling a global function with example usage: predict(ctx, role, test_data, batch_size, threshold, predict_input_model, test_output_data) without return types