code: def _init_sample_scores(
      self, ctx: Context, label, train_data: DataFrame
  ):
      task_type = self.objective.split(":")[0]
      pred_ctx = ctx.sub_ctx("warmstart_predict")
      if self._model_loaded:
          logger.info("prepare warmstarting score")
          self._accumulate_scores = self.predict(
              pred_ctx, train_data, ret_raw_scores=True
          )
          self._accumulate_scores = self._accumulate_scores.loc(
              train_data.get_indexer(target="sample_id"),
              preserve_order=True,
          )
      else:
          if task_type == REGRESSION:
              (
                  self._accumulate_scores,
                  avg_score,
              ) = self._loss_func.initialize(label)
              if self._init_score is None:
                  self._init_score = avg_score
          else:
              self._accumulate_scores = self._loss_func.initialize(
                  label
              )
  
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 5 for calling the HeteroSecureBoostGuest obj's underlying member method code with example usage: obj._init_sample_scores(ctx, label, train_data) without return types