code: def hash_vocab(
      vocab_path,
      output_path,
      unk_tok="[UNK]",
      first_token="[CLS]",
      sep_token="[SEP]",
  ):
      """
      Write the vocab vocabulary hashtable to the output_path
      """
      np.random.seed(1243342)
      vocab = _load_vocab_dict(vocab_path)
      keys = list(map(_sdbm_hash, vocab.keys()))
  
      hashed_vocab = {
          _sdbm_hash(key): value for key, value in vocab.items()
      }
  
      error_message = (
          "A collision occurred and only sdbm token hash is currently "
          "supported. This can be extended to use random hashes if needed."
      )
      assert len(hashed_vocab) == len(vocab), error_message
  
      (
          outer_a,
          outer_b,
          num_outer_bins,
          hash_table,
          inner_table_coeffs,
          offsets_into_ht,
      ) = _perfect_hash(keys, 10)
  
      _pack_keys_and_values(hash_table, hashed_vocab)
      _store_func(
          output_path,
          outer_a,
          outer_b,
          num_outer_bins,
          hash_table,
          inner_table_coeffs,
          offsets_into_ht,
          vocab[unk_tok],
          vocab[first_token],
          vocab[sep_token],
      )
  
      for key, value in hashed_vocab.items():
          val = _retrieve(
              key,
              outer_a,
              outer_b,
              num_outer_bins,
              hash_table,
              inner_table_coeffs,
              offsets_into_ht,
          )
          assert (
              val == value
          ), f"Incorrect value found. Got {val} expected {value}"
  
      print("All present tokens return correct value.")
  
file_path: cudf/python/cudf/cudf/utils/hash_vocab_utils.py
imports: import numpy
label_desc: Use image node_id 14 for calling a global function with example usage: hash_vocab(vocab_path, output_path, unk_tok, first_token, sep_token) without return types