code: def _merge_sample_pos(s: pd.Series):
      if s["g_on_local"]:
          return s["g_on_local"], s["g_node_idx"]
      else:
          return s["h_on_local"], s["h_node_idx"]
  
imports: import numpy
  import pandas
  from fate.arch import Context
  from fate.arch.dataframe import DataFrame
  from fate.ml.ensemble.learner.decision_tree.tree_core.splitter import SplitInfo
  from typing import List
  import logging
label_desc: Use image node_id 5 for calling a global function with example usage: _merge_sample_pos(s) and returns: s,  s, s,  s