code: def _get_sample_on_local_nodes(
      s: pd.Series, cur_layer_node: List[Node], node_map: dict, sitename
  ):
      node_id = s.iloc[-1]
      node = cur_layer_node[node_map[node_id]]
      on_local_node = node.sitename == sitename
      return on_local_node
  
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 3 for calling a global function with example usage: _get_sample_on_local_nodes(s, cur_layer_node, node_map, sitename) and returns: on_local_node