class_docstr: Tracking SQL queries in a code block.
  
  :param display_num: If True, displays the query number.
  :param display_time: If True, displays the query execution time.
  :param display_trace: If True, displays the simplified (one-line) stack trace
  :param display_sql: If True, displays the SQL statements
  :param display_parameters: If True, display SQL statement parameters
  :param print_fn: The function used to display the text. By default,``builtins.print``
class_docstr_tok: ["Tracking","SQL","queries","in","a","code","block",".",":","param","display_num",":","If","True",",","displays","the","query","number",".",":","param","display_time",":","If","True",",","displays","the","query","execution","time",".",":","param","display_trace",":","If","True",",","displays","the","simplified","(","one-line",")","stack","trace",":","param","display_sql",":","If","True",",","displays","the","SQL","statements",":","param","display_parameters",":","If","True",",","display","SQL","statement","parameters",":","param","print_fn",":","The","function","used","to","display","the","text",".","By","default",",","``","builtins.print","``"]
docstr: Executed before cursor.
  
  :param conn:  connection
  :param cursor:  cursor
  :param statement: statement
  :param parameters: parameters
  :param context: context
  :param executemany: whether many statements executed
  :return:
docstr_tok: ["Executed","before","cursor",".",":","param","conn",":","connection",":","param","cursor",":","cursor",":","param","statement",":","statement",":","param","parameters",":","parameters",":","param","context",":","context",":","param","executemany",":","whether","many","statements","executed",":","return",":"]
code: def before_cursor_execute(
      self,
      conn,
      cursor,
      statement,
      parameters,
      context,
      executemany,
  ):
      """
      Executed before cursor.
  
      :param conn:  connection
      :param cursor:  cursor
      :param statement: statement
      :param parameters: parameters
      :param context: context
      :param executemany: whether many statements executed
      :return:
      """
  
      conn.info.setdefault("query_start_time", []).append(
          time.monotonic()
      )
      self.query_count += 1
  
file_path: airflow/tests/test_utils/perf/perf_kit/sqlalchemy.py
imports: from __future__ import annotations
  import os
  import time
  import traceback
  from typing import Callable
  from sqlalchemy import event
label_desc: Use image node_id 2 for calling the TraceQueries obj's underlying member method code with example usage: obj.before_cursor_execute(conn, cursor, statement, parameters, context, executemany) without return types