code: def is_docstring(leaf: Leaf) -> bool:
      if leaf.type != token.STRING:
          return False
  
      prefix = get_string_prefix(leaf.value)
      if set(prefix).intersection("bBfF"):
          return False
  
      if prev_siblings_are(
          leaf.parent,
          [None, token.NEWLINE, token.INDENT, syms.simple_stmt],
      ):
          return True
  
      # Multiline docstring on the same line as the `def`.
      if prev_siblings_are(
          leaf.parent, [syms.parameters, token.COLON, syms.simple_stmt]
      ):
          # `syms.parameters` is only used in funcdefs and async_funcdefs in the Python
          # grammar. We're safe to return True without further checks.
          return True
  
      return False
  
imports: import sys
  from typing import Final, Generic, Iterator, List, Optional, Set, Tuple, TypeVar, Union
  from mypy_extensions import mypyc_attr
  from black.cache import CACHE_DIR
  from black.mode import Mode, Preview
  from black.strings import get_string_prefix, has_triple_quotes
  from blib2to3 import pygram
  from blib2to3.pgen2 import token
  from blib2to3.pytree import NL, Leaf, Node, type_repr
label_desc: Use image node_id 11 for calling a global function with example usage: is_docstring(leaf) and returns: False, False, False, True, True