code: def execute_query(query_name, group_concat_max_len=None):
      with connection.cursor() as cursor:
          if group_concat_max_len:
              cursor.execute(
                  "SET SESSION group_concat_max_len = %d"
                  % group_concat_max_len
              )
              cursor.execute("SET TIME ZONE 'UTC'")
          cursor.execute(query_name)
          description = cursor.description
          rows = cursor.fetchall()
          result = [
              dict(zip([column[0] for column in description], row))
              for row in rows
          ]
  
      return result
  
imports: import logging
  from django.db import connection
label_desc: Use image node_id 1 for calling a global function with example usage: execute_query(query_name, group_concat_max_len) and returns: result