code: def singleton(cls):
      """
      Wrapper that creates singleton instance of class that it is fed.
  
      Returns:
          any: Singleton instance of class.
      """
      instances = {}
      lock = threading.Lock()
  
      @wraps(cls)
      def wrapper(*args, **kargv):
          if cls not in instances:
              with lock:
                  if cls not in instances:
                      instances[cls] = cls(*args, **kargv)
          return instances[cls]
  
      return wrapper
  
label_desc: Use image node_id 1 for calling a global function with example usage: singleton(cls) and returns: wrapper, instances