def register_context(name, cls, *args, **kwargs):
 instance = cls(*args, **kwargs)
 proxy = ProxyContext(instance)
 _contexts[name] = {'cls': cls, 'args': args, 'kwargs': kwargs, 'proxy': proxy}
 _default_context[name] = instance
 return proxy

def register_context ( name , cls , * args , ** kwargs ) : instance = cls ( * args , ** kwargs ) proxy = ProxyContext ( instance ) _contexts [ name ] = { 'cls' : cls , 'args' : args , 'kwargs' : kwargs , 'proxy' : proxy } _default_context [ name ] = instance return proxy
register a new context .