code: def build_python_parser_and_generator(
      grammar_file: str,
      output_file: str,
      verbose_tokenizer: bool = False,
      verbose_parser: bool = False,
      skip_actions: bool = False,
  ) -> Tuple[Grammar, Parser, Tokenizer, ParserGenerator]:
      """Generate rules, python parser, tokenizer, parser generator for a given grammar
  
      Args:
          grammar_file (string): Path for the grammar file
          output_file (string): Path for the output file
          verbose_tokenizer (bool, optional): Whether to display additional output
            when generating the tokenizer. Defaults to False.
          verbose_parser (bool, optional): Whether to display additional output
            when generating the parser. Defaults to False.
          skip_actions (bool, optional): Whether to pretend no rule has any actions.
      """
      grammar, parser, tokenizer = build_parser(
          grammar_file, verbose_tokenizer, verbose_parser
      )
      gen = build_python_generator(
          grammar,
          grammar_file,
          output_file,
          skip_actions=skip_actions,
      )
      return grammar, parser, tokenizer, gen
  
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 9 for calling a global function with example usage: build_python_parser_and_generator(grammar_file, output_file, verbose_tokenizer, verbose_parser, skip_actions) and returns: grammar,  parser,  tokenizer,  gen