code: def predict_leaf_host(
      ctx: Context, trees: List[DecisionTree], data: DataFrame
  ):
      tree_list = [tree.get_nodes() for tree in trees]
      sitename = ctx.local.name
      map_func = functools.partial(
          traverse_tree, trees=tree_list, sitename=sitename
      )
  
      # help guest to traverse tree
      comm_round = 0
  
      # start loop here
      while True:
          sub_ctx = ctx.sub_ctx("predict_round").indexed_ctx(comm_round)
          need_stop = sub_ctx.guest.get("need_stop")
          if need_stop:
              break
          pending_samples = sub_ctx.guest.get("pending_samples")
          logger.info(
              "got {} pending samples".format(len(pending_samples))
          )
          sample_features = data.loc(
              pending_samples.get_indexer("sample_id"),
              preserve_order=True,
          )
          sample_with_pos = DataFrame.hstack(
              [sample_features, pending_samples]
          )
          new_pos = sample_with_pos.create_frame()
          new_pos["host_sample_pos"] = sample_with_pos.apply_row(
              map_func
          )
          sub_ctx.guest.put("updated_pos", (new_pos))
          comm_round += 1
  
      logger.info("predict done")
  
file_path: FATE/python/fate/ml/ensemble/algo/secureboost/common/predict.py
imports: import pandas
  import numpy
  from typing import List
  from fate.arch import Context
  from fate.arch.dataframe import DataFrame
  import copy
  from fate.ml.ensemble.learner.decision_tree.tree_core.decision_tree import DecisionTree, _make_decision, Node
  import functools
  from logging import getLogger
label_desc: Use image node_id 10 for calling a global function with example usage: predict_leaf_host(ctx, trees, data) without return types