code: def predict_procedure(
      ctx: Context,
      role: Role,
      test_data: DataframeReader,
      predict_model_input: ModelDirectoryReader,
      predict_data_output: DataframeWriter,
      is_hetero=False,
  ):
      model_conf = predict_model_input.get_metadata()
      runner_module = model_conf["runner_module"]
      runner_class = model_conf["runner_class"]
      runner_conf = model_conf["runner_conf"]
      source = model_conf["source"]
      saved_model_path = str(predict_model_input.get_directory())
      test_data_ = get_input_data(consts.PREDICT, test_data)
      runner: NNRunner = prepare_runner_class(
          runner_module, runner_class, runner_conf, source
      )
      prepare_context_and_role(runner, ctx, role, consts.PREDICT)
      test_pred = runner.predict(
          test_data_, saved_model_path=saved_model_path
      )
      if test_pred is not None:
          assert isinstance(
              test_pred, DataFrame
          ), "test predict result should be a DataFrame"
          add_dataset_type(test_pred, consts.TEST_SET)
          predict_data_output.write(test_pred)
      else:
          if is_hetero and role.is_host:
              pass
          else:
              logger.warning(
                  "test_pred is None, It seems that the runner is not able to predict. Failed to output data"
              )
  
file_path: FATE/python/fate/components/components/nn/component_utils.py
imports: from fate.components.components.nn.loader import Loader
  from fate.components.components.nn.nn_runner import NNRunner
  from fate.components.components.utils import consts
  from fate.arch.dataframe import DataFrame
  from fate.components.components.utils.tools import add_dataset_type
  from fate.arch import Context
  from fate.components.core import ARBITER, GUEST, HOST, Role, cpn
  import logging
  from fate.components.core.component_desc.artifacts.data._dataframe import DataframeReader, DataframeWriter
  from fate.components.core.component_desc.artifacts.data._directory import DataDirectoryReader
  from fate.components.core.component_desc.artifacts.model._directory import ModelDirectoryReader, ModelDirectoryWriter
label_desc: Use image node_id 8 for calling a global function with example usage: predict_procedure(ctx, role, test_data, predict_model_input, predict_data_output, is_hetero) without return types