code: def _delayed(func):
      def wrapper(*args, **kwargs):
          flag = 0
          while flag < REPEATED_TIME:
              try:
                  LOCK.acquire()  # make sure not to call @_delayed functions recursively from one another
                  results = func(*args, **kwargs)
                  return results
              except sqlite3.ProgrammingError as ex:  # pragma: no cover
                  logger.critical(
                      "update is too frequent, delayed for 1 sec"
                  )
                  logger.debug(
                      "sqlite3 programming error: {}".format(ex)
                  )
                  sleep(DELAY_INTERVAL)
                  flag += 1
              finally:
                  LOCK.release()
          raise Exception(
              "Failed to query SQLite after %d times" % flag
          )  # pragma: no cover
  
      return wrapper
  
imports: import logging
  import re
  import sqlite3
  import threading
  from time import sleep
  import json
  from datetime import datetime
  from .AbstractConnector import AbstractConnector
label_desc: Use image node_id 1 for calling a global function with example usage: _delayed(func) and returns: wrapper, results