code: def load_unigram_set_from_arpa(arpa_path: str) -> Set[str]:
      """Read unigrams from arpa file.
  
      Taken from: https://github.com/kensho-technologies/pyctcdecode
  
      Arguments
      ---------
      arpa_path : str
          Path to arpa file.
  
      Returns
      -------
      unigrams : set
          Set of unigrams.
      """
      unigrams = set()
      with open(arpa_path) as f:
          start_1_gram = False
          for line in f:
              line = line.strip()
              if line == "\\1-grams:":
                  start_1_gram = True
              elif line == "\\2-grams:":
                  break
              if start_1_gram and len(line) > 0:
                  parts = line.split("\t")
                  if len(parts) == 3:
                      unigrams.add(parts[1])
      if len(unigrams) == 0:
          raise ValueError(
              "No unigrams found in arpa file. Something is wrong with the file."
          )
      return unigrams
  
file_path: speechbrain/speechbrain/decoders/language_model.py
imports: import logging
  from typing import Collection, Optional, Set, Tuple, cast
  from pygtrie import CharTrie
  import math
label_desc: Use image node_id 1 for calling a global function with example usage: load_unigram_set_from_arpa(arpa_path) and returns: unigrams