code: def singleton(class_):
      instances = {}
  
      def getinstance(*args, **kwargs):
          if class_ not in instances:
              instances[class_] = class_(*args, **kwargs)
          return instances[class_]
  
      return getinstance
  
label_desc: Use image node_id 1 for calling a global function with example usage: singleton(class_) and returns: getinstance, instances