docstr: Receive raw query and act upon it somehow.
  Args:
      query (Any): query in native format (str for sql databases,
          dict for mongo, etc)
  Returns:
      HandlerResponse
docstr_tok: ["Receive","raw","query","and","act","upon","it","somehow",".","Args",":","query","(","Any",")",":","query","in","native","format","(","str","for","sql","databases",",","dict","for","mongo",",","etc",")","Returns",":","HandlerResponse"]
code: def native_query(self, query: str) -> StatusResponse:
      """Receive raw query and act upon it somehow.
      Args:
          query (Any): query in native format (str for sql databases,
              dict for mongo, etc)
      Returns:
          HandlerResponse
      """
      need_to_close = self.is_connected is False
      query = query.upper()
      conn = self.connect()
      with conn.cursor() as cur:
          try:
              cur.execute(query)
  
              if cur._result_set_produced:
                  result = cur.fetchall()
                  response = Response(
                      RESPONSE_TYPE.TABLE,
                      data_frame=pd.DataFrame(
                          result,
                          columns=[x[0] for x in cur.description],
                      ),
                  )
              else:
                  response = Response(RESPONSE_TYPE.OK)
              self.connection.commit()
          except Exception as e:
              logger.error(
                  f"Error running query: {query} on {self.database}!"
              )
              response = Response(
                  RESPONSE_TYPE.ERROR, error_message=str(e)
              )
              self.connection.rollback()
  
      if need_to_close is True:
          self.disconnect()
  
      return response
  
imports: from collections import OrderedDict
  from typing import Optional
  from mindsdb_sql.parser.ast.base import ASTNode
  from mindsdb.integrations.libs.base import DatabaseHandler
  from mindsdb.utilities import log
  from mindsdb_sql import parse_sql
  from mindsdb_sql.render.sqlalchemy_render import SqlalchemyRender
  from mindsdb.integrations.libs.response import HandlerStatusResponse, HandlerResponse, RESPONSE_TYPE
  from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE
  import pandas
  import ibm_db_dbi
  from ibm_db_sa.ibm_db import DB2Dialect_ibm_db
label_desc: Use image node_id 5 for calling the DB2Handler obj's underlying member method code with example usage: obj.native_query(query) and returns: response