code: def singleton(cls):
      instance = {}
  
      def _singleton(*args, **kwargs):
          if cls not in instance:
              instance[cls] = cls(*args, **kwargs)
          return instance[cls]
  
      return _singleton
  
imports: import cpuinfo
label_desc: Use image node_id 1 for calling a global function with example usage: singleton(cls) and returns: _singleton, instance