code: def get_partition_hist_build_mapper(
      num_node,
      feature_bin_sizes,
      value_schemas,
      global_seed,
      k,
      node_mapping,
      enable_cumsum,
  ):
      def _partition_hist_build_mapper(part):
          hist = Histogram.create(
              num_node, feature_bin_sizes, value_schemas
          )
          for _, raw in part:
              feature_ids, node_ids, targets = raw
              hist.i_update(
                  feature_ids, node_ids, targets, node_mapping
              )
          if enable_cumsum:
              hist.i_cumsum_bins()
          if global_seed is not None:
              hist.i_shuffle(global_seed)
          splits = hist.to_splits(k)
          return splits
  
      return _partition_hist_build_mapper
  
imports: from ._histogram_distributed import DistributedHistogram
  from ._histogram_local import Histogram
label_desc: Use image node_id 1 for calling a global function with example usage: get_partition_hist_build_mapper(num_node, feature_bin_sizes, value_schemas, global_seed, k, node_mapping, enable_cumsum) and returns: _partition_hist_build_mapper, splits