code: def singleton(class_):
      """
      singleton instace
      """
      instances = {}
  
      def _get_instance(*args, **kwargs):
          if class_ not in instances:
              instances[class_] = class_(*args, **kwargs)
          return instances[class_]
  
      return _get_instance
  
file_path: CNTK/bindings/python/cntk/contrib/crosstalkcaffe/adapter/bvlccaffe/caffeimpl.py
imports: import sys
  from cntk.contrib.crosstalkcaffe.unimodel.cntkmodel import CntkLayerType
label_desc: Use image node_id 1 for calling a global function with example usage: singleton(class_) and returns: _get_instance, instances