class_docstr: For Python source code (version 3.x).
  
  .. versionadded:: 0.10
  
  .. versionchanged:: 2.5
     This is now the default ``PythonLexer``.  It is still available as the
     alias ``Python3Lexer``.
code: def fstring_rules(ttype):
      return [
          # Assuming that a '}' is the closing brace after format specifier.
          # Sadly, this means that we won't detect syntax error. But it's
          # more important to parse correct syntax correctly, than to
          # highlight invalid syntax.
          (r"\}", String.Interpol),
          (r"\{", String.Interpol, "expr-inside-fstring"),
          # backslashes, quotes and formatting signs must be parsed one at a time
          (r'[^\\\'"{}\n]+', ttype),
          (r'[\'"\\]', ttype),
          # newlines are an error (use "nl" state)
      ]
  
imports: import re
  import keyword
  from pygments.lexer import DelegatingLexer, Lexer, RegexLexer, include, bygroups, using, default, words, combined, do_insertions, this, line_re
  from pygments.util import get_bool_opt, shebang_matches
  from pygments.token import Text, Comment, Operator, Keyword, Name, String, Number, Punctuation, Generic, Other, Error, Whitespace
  from pygments import unistring
label_desc: Use image node_id 2 for calling the PythonLexer obj's underlying member method code with example usage: obj.fstring_rules(ttype) and returns: list