code: def _perfect_hash(integers, max_constant):
      num_top_level_bins = len(integers) // 4
  
      init_bins, init_a, init_b = _pick_initial_a_b(
          integers, max_constant, num_top_level_bins
      )
      flattened_bins = []
  
      internal_table_coeffs = np.zeros(
          shape=[num_top_level_bins], dtype=np.uint64
      )
      offset_into_flattened_table = np.zeros(
          shape=[num_top_level_bins + 1], dtype=np.uint64
      )
  
      max_bin_length = 0
      for i, b in enumerate(init_bins):
          if i % 500 == 0:
              print(
                  f"Processing bin {i} / {len(init_bins)} of size = {len(b)}"
              )
          internal_table, coeff_a, coeff_b = _find_hash_for_internal(b)
          bin_length = len(internal_table)
          max_bin_length = max(bin_length, max_bin_length)
          internal_table_coeffs[i] = (
              coeff_a << A_SECOND_LEVEL_SHIFT_AMT
              | coeff_b << B_SECOND_LEVEL_SHIFT_AMT
              | bin_length
          )
          offset_into_flattened_table[i + 1] = (
              offset_into_flattened_table[i] + bin_length
          )
          flattened_bins.extend(internal_table)
  
      print(
          "Final table size {} elements compared to {} for original".format(
              len(flattened_bins), len(integers)
          )
      )
  
      print("Max bin length was", max_bin_length)
  
      return (
          init_a,
          init_b,
          num_top_level_bins,
          flattened_bins,
          internal_table_coeffs,
          offset_into_flattened_table,
      )
  
file_path: cudf/python/cudf/cudf/utils/hash_vocab_utils.py
imports: import numpy
label_desc: Use image node_id 9 for calling a global function with example usage: _perfect_hash(integers, max_constant) and returns: init_a,  init_b,  num_top_level_bins,  flattened_bins,  internal_table_coeffs,  offset_into_flattened_table