code: def cursor_factory(**factory_options):
      def cursor(**options):
          options.update(factory_options)
          return Cursor(**options)
  
      return cursor
  
file_path: dejavu/dejavu/database_handler/mysql_database.py
imports: import queue
  import mysql.connector
  from mysql.connector.errors import DatabaseError
  from dejavu.base_classes.common_database import CommonDatabase
  from dejavu.config.settings import FIELD_FILE_SHA1, FIELD_FINGERPRINTED, FIELD_HASH, FIELD_OFFSET, FIELD_SONG_ID, FIELD_SONGNAME, FIELD_TOTAL_HASHES, FINGERPRINTS_TABLENAME, SONGS_TABLENAME
label_desc: Use image node_id 1 for calling a global function with example usage: cursor_factory() and returns: cursor, Cursor