def display_backtrace?(payload)
      ActiveRecordQueryTrace.enabled \
        && !transaction_begin_or_commit_query?(payload) \
        && !schema_query?(payload) \
        && !(ActiveRecordQueryTrace.ignore_cached_queries && payload[:cached]) \
        && !(ActiveRecordQueryTrace.suppress_logging_of_db_reads && db_read_query?(payload)) \
        && display_backtrace_for_query_type?(payload)
    end
def display_backtrace?(payload)
      ActiveRecordQueryTrace.enabled \
        && !transaction_begin_or_commit_query?(payload) \
        && !schema_query?(payload) \
        && !(ActiveRecordQueryTrace.ignore_cached_queries && payload[:cached]) \
        && !(ActiveRecordQueryTrace.suppress_logging_of_db_reads && db_read_query?(payload)) \
        && display_backtrace_for_query_type?(payload)
    end
rubocop:disable Metrics/CyclomaticComplexity
 rubocop:disable Metrics/PerceivedComplexity
 TODO: refactor and remove rubocop:disable comments.