code: def not_inside_unclosed_string():
      app = get_app()
      s = app.current_buffer.document.text_before_cursor
      # remove escaped quotes
      s = s.replace('\\"', "").replace("\\'", "")
      # remove triple-quoted string literals
      s = re.sub(r"(?:\"\"\"[\s\S]*\"\"\"|'''[\s\S]*''')", "", s)
      # remove single-quoted string literals
      s = re.sub(r"""(?:"[^"]*["\n]|'[^']*['\n])""", "", s)
      return not ('"' in s or "'" in s)
  
imports: import ast
  import re
  import signal
  import sys
  from typing import Callable, Dict, Union
  from prompt_toolkit.application.current import get_app
  from prompt_toolkit.enums import DEFAULT_BUFFER, SEARCH_BUFFER
  from prompt_toolkit.key_binding import KeyPressEvent
  from prompt_toolkit.filters import Condition, Filter, emacs_insert_mode, has_completions
  from prompt_toolkit.filters import has_focus
  from prompt_toolkit.filters import Always, Never, has_selection, has_suggestion, vi_insert_mode, vi_mode
  from prompt_toolkit.layout.layout import FocusableElement
  from IPython.core.getipython import get_ipython
  from IPython.core.guarded_eval import _find_dunder, BINARY_OP_DUNDERS, UNARY_OP_DUNDERS
  from IPython.terminal.shortcuts import auto_suggest
  from IPython.utils.decorators import undoc
label_desc: Use image node_id 12 for calling a global function with example usage: not_inside_unclosed_string() and returns: unknown