code: def make_mask(cat_table, cut):
      
      cut_var = cut['cut_var']
      min_val = cut.get('min_val', None)
      max_val = cut.get('max_val', None)
  
      nsrc = len(cat_table)
      if min_val is None:
          min_mask = np.ones((nsrc), bool)
      else:
          min_mask = cat_table[cut_var] >= min_val
      if max_val is None:
          max_mask = np.ones((nsrc), bool)
      else:
          max_mask = cat_table[cut_var] <= max_val
      full_mask = min_mask * max_mask
      return full_mask
docs: Mask a bit mask selecting the rows that pass a selection