code: def _compute_gains(
      self, g, h, cnt, g_sum, h_sum, cnt_sum, hist_mask=None
  ):
      l_g, l_h, l_cnt = g, h, cnt
      r_g, r_h = g_sum - l_g, h_sum - l_h
      r_cnt = cnt_sum - l_cnt
  
      # filter split
      # leaf count
      union_mask_0 = self._compute_min_leaf_mask(l_cnt, r_cnt)
      # min child weight
      min_child_weight_mask_l = l_h < self.min_child_weight
      min_child_weight_mask_r = r_h < self.min_child_weight
      union_mask_1 = torch.logical_or(
          min_child_weight_mask_l, min_child_weight_mask_r
      )
      if hist_mask is not None:
          mask = torch.logical_or(union_mask_0, hist_mask)
      else:
          mask = union_mask_0
      mask = torch.logical_or(mask, union_mask_1)
      rs = (
          self.node_gain(l_g, l_h)
          + self.node_gain(r_g, r_h)
          - self.node_gain(g_sum, h_sum)
      )
      rs = self.truncate(rs)
      rs[torch.isnan(rs)] = float("-inf")
      rs[rs < self.min_impurity_split] = float("-inf")
      rs[mask] = float("-inf")
      return rs
  
imports: import torch
  import numpy
  import logging
  from fate.arch.dataframe import DataFrame
  from fate.arch import Context
  from fate.arch.histogram import DistributedHistogram
label_desc: Use image node_id 10 for calling the SBTSplitter obj's underlying member method code with example usage: obj._compute_gains(g, h, cnt, g_sum, h_sum, cnt_sum, hist_mask) and returns: rs