<s> import traceback <EOL> factories = { } <EOL> def register ( _id , callbacks , schemas , formats ) : <EOL> ret = { } <EOL> if '<STR_LIT>' in schemas : <EOL> try : <EOL> import calvinbt_transport <EOL> f = calvinbt_transport . CalvinTransportFactory ( _id , callbacks ) <EOL> factories [ _id ] = f <EOL> ret [ '<STR_LIT>' ] = f <EOL> except ImportError : <EOL> traceback . print_exc ( ) <EOL> return ret </s>
