docstr: predict function
  
  Parameters
  ----------
  ctx: Context
      FATE Context object
  predict_data: DataFrame
      Data used to predict.
  predict_leaf: bool, optional
      Whether to predict and return leaf index.
  ret_std_format: bool, optional
      Whether to return result in a FATE standard format which contains more details.
  ret_raw_scores:
      Whether to return raw scores.
docstr_tok: ["predict","function","Parameters","--","--","--","--","--","ctx",":","Context","FATE","Context","object","predict_data",":","DataFrame","Data","used","to","predict",".","predict_leaf",":","bool",",","optional","Whether","to","predict","and","return","leaf","index",".","ret_std_format",":","bool",",","optional","Whether","to","return","result","in","a","FATE","standard","format","which","contains","more","details",".","ret_raw_scores",":","Whether","to","return","raw","scores","."]
code: def predict(
      self,
      ctx: Context,
      predict_data: DataFrame,
      predict_leaf=False,
      ret_std_format=True,
      ret_raw_scores=False,
  ) -> DataFrame:
      """
      predict function
  
      Parameters
      ----------
      ctx: Context
          FATE Context object
      predict_data: DataFrame
          Data used to predict.
      predict_leaf: bool, optional
          Whether to predict and return leaf index.
      ret_std_format: bool, optional
          Whether to return result in a FATE standard format which contains more details.
      ret_raw_scores:
          Whether to return raw scores.
      """
  
      task_type, classes = self.get_task_info()
      leaf_pos = predict_leaf_guest(ctx, self._trees, predict_data)
      if predict_leaf:
          return leaf_pos
      raw_scores = self._sum_leaf_weights(
          leaf_pos,
          self._trees,
          self.learning_rate,
          num_dim=self._tree_dim,
      )
      if task_type == REGRESSION:
          logger.debug("regression task, add init score")
          raw_scores = self._init_score + raw_scores
  
      if ret_raw_scores:
          return raw_scores
      result = self._loss_func.predict(raw_scores)
  
      if ret_std_format:
          # align table
          result: DataFrame = result.loc(
              predict_data.get_indexer(target="sample_id"),
              preserve_order=True,
          )
          ret_frame = result.create_frame()
          if predict_data.schema.label_name is not None:
              ret_frame.label = predict_data.label
          ret_frame[PREDICT_SCORE] = result["score"]
  
          return compute_predict_details(ret_frame, task_type, classes)
      else:
          return result
  
imports: import numpy
  import pandas
  from typing import Optional, Union
  from fate.arch import Context
  from fate.arch.dataframe import DataFrame
  from fate.ml.ensemble.algo.secureboost.hetero._base import HeteroBoostingTree
  from fate.ml.ensemble.learner.decision_tree.hetero.guest import HeteroDecisionTreeGuest
  from fate.ml.ensemble.utils.binning import binning
  from fate.ml.ensemble.learner.decision_tree.tree_core.loss import OBJECTIVE, get_task_info, MULTI_CE, BINARY_BCE, REGRESSION_L2
  from fate.ml.ensemble.algo.secureboost.common.predict import predict_leaf_guest
  from fate.ml.utils.predict_tools import compute_predict_details, PREDICT_SCORE, BINARY, MULTI, REGRESSION
  from fate.ml.ensemble.learner.decision_tree.tree_core.decision_tree import GUEST_FEAT_ONLY, ALL_FEAT
  from fate.ml.ensemble.utils.sample import goss_sample
  import logging
label_desc: Use image node_id 10 for calling the HeteroSecureBoostGuest obj's underlying member method code with example usage: obj.predict(ctx, predict_data, predict_leaf, ret_std_format, ret_raw_scores) and returns: leaf_pos, raw_scores, compute_predict_details, result