code: def build_parser(
      grammar_file: str,
      verbose_tokenizer: bool = False,
      verbose_parser: bool = False,
  ) -> Tuple[Grammar, Parser, Tokenizer]:
      with open(grammar_file) as file:
          tokenizer = Tokenizer(
              tokenize.generate_tokens(file.readline),
              verbose=verbose_tokenizer,
          )
          parser = GrammarParser(tokenizer, verbose=verbose_parser)
          grammar = parser.start()
  
          if not grammar:
              raise parser.make_syntax_error(grammar_file)
  
      return grammar, parser, tokenizer
  
imports: import itertools
  import logging
  import os
  import pathlib
  import sys
  import sysconfig
  import tempfile
  import tokenize
  from typing import IO, Any, Dict, List, Optional, Set, Tuple
  from pegen.c_generator import CParserGenerator
  from pegen.grammar import Grammar
  from pegen.grammar_parser import GeneratedParser
  from pegen.parser import Parser
  from pegen.parser_generator import ParserGenerator
  from pegen.python_generator import PythonParserGenerator
  from pegen.tokenizer import Tokenizer
label_desc: Use image node_id 4 for calling a global function with example usage: build_parser(grammar_file, verbose_tokenizer, verbose_parser) and returns: grammar,  parser,  tokenizer