code: def execute(c, sql, suppress_errors=True):
      """Helper that wraps execution of SQL code.
  
      This is used both by the REPL and by direct execution from the CLI.
  
      'c' may be a cursor or a connection.
      'sql' is the SQL string to execute.
      """
  
      try:
          for row in c.execute(sql):
              print(row)
      except sqlite3.Error as e:
          tp = type(e).__name__
          try:
              print(
                  f"{tp} ({e.sqlite_errorname}): {e}", file=sys.stderr
              )
          except AttributeError:
              print(f"{tp}: {e}", file=sys.stderr)
          if not suppress_errors:
              sys.exit(1)
  
file_path: cpython/Lib/sqlite3/__main__.py
imports: import sqlite3
  import sys
  from argparse import ArgumentParser
  from code import InteractiveConsole
  from textwrap import dedent
label_desc: Use image node_id 1 for calling a global function with example usage: execute(c, sql, suppress_errors) without return types