code: def load_grammar(**kwargs):
      """
      Loads a :py:class:`parso.Grammar`. The default version is the current Python
      version.
  
      :param str version: A python version string, e.g. ``version='3.8'``.
      :param str path: A path to a grammar file
      """
  
      def load_grammar(language="python", version=None, path=None):
          if language == "python":
              version_info = parse_version_string(version)
  
              file = path or os.path.join(
                  "python",
                  "grammar%s%s.txt"
                  % (version_info.major, version_info.minor),
              )
  
              global _loaded_grammars
              path = os.path.join(os.path.dirname(__file__), file)
              try:
                  return _loaded_grammars[path]
              except KeyError:
                  try:
                      bnf_text = pkgutil.get_data("parso", file)
                      if bnf_text is None:
                          raise FileNotFoundError
                      if sys.version_info[0] == 3:
                          bnf_text = bnf_text.decode("ascii")
  
                      grammar = PythonGrammar(version_info, bnf_text)
                      return _loaded_grammars.setdefault(path, grammar)
                  except (FileNotFoundError, IOError):
                      message = (
                          "Python version %s.%s is currently not supported."
                          % (version_info.major, version_info.minor)
                      )
                      raise NotImplementedError(message)
          else:
              raise NotImplementedError(
                  "No support for language %s." % language
              )
  
      return load_grammar(**kwargs)
  
imports: import hashlib
  import os
  import sys
  import pkgutil
  from parso._compatibility import FileNotFoundError, is_pypy
  from parso.pgen2 import generate_grammar
  from parso.utils import split_lines, python_bytes_to_unicode, parse_version_string
  from parso.python.diff import DiffParser
  from parso.python.tokenize import tokenize_lines, tokenize
  from parso.python.token import PythonTokenTypes
  from parso.cache import parser_cache, load_module, try_to_save_module
  from parso.parser import BaseParser
  from parso.python.parser import Parser
  from parso.python.errors import ErrorFinderConfig
  from parso.python import pep8
  from parso.file_io import FileIO, KnownContentFileIO
  from parso.normalizer import RefactoringNormalizer
label_desc: Use image node_id 1 for calling a global function with example usage: load_grammar() and returns: load_grammar, _loaded_grammars, _loaded_grammars