code: def _next_section_or_end(fstream):
      """
      Returns
      -------
      bool
          Whether end was found.
      int
          The order of section that starts
      """
      for line in fstream:
          line = line.strip()
          if _starts_ngrams_section(line):
              order = _parse_order(line)
              return False, order
          if _ends_arpa(line):
              return True, None
      # If we got here, it's not a properly formatted file
      raise ValueError("Not a properly formatted ARPA file")
  
file_path: speechbrain/speechbrain/lm/arpa.py
imports: import collections
  import logging
label_desc: Use image node_id 3 for calling a global function with example usage: _next_section_or_end(fstream) and returns: False,  order, True,  None