def _create_transport_serializers(transport):
 serializers = []
 for serializer_id in transport.serializers:
  if (serializer_id == u'msgpack'):
   try:
    from autobahn.wamp.serializer import MsgPackSerializer
   except ImportError:
    pass
   else:
    serializers.append(MsgPackSerializer(batched=True))
    serializers.append(MsgPackSerializer())
  elif (serializer_id == u'json'):
   try:
    from autobahn.wamp.serializer import JsonSerializer
   except ImportError:
    pass
   else:
    serializers.append(JsonSerializer(batched=True))
    serializers.append(JsonSerializer())
  else:
   raise RuntimeError("Unknown serializer '{}'".format(serializer_id))
 return serializers

def _create_transport_serializers ( transport ) : serializers = [ ] for serializer_id in transport . serializers : if ( serializer_id == u'msgpack' ) : try : from autobahn . wamp . serializer import MsgPackSerializer except ImportError : pass else : serializers . append ( MsgPackSerializer ( batched = True ) ) serializers . append ( MsgPackSerializer ( ) ) elif ( serializer_id == u'json' ) : try : from autobahn . wamp . serializer import JsonSerializer except ImportError : pass else : serializers . append ( JsonSerializer ( batched = True ) ) serializers . append ( JsonSerializer ( ) ) else : raise RuntimeError ( "Unknown serializer '{}'" . format ( serializer_id ) ) return serializers
create a list of serializers to use with a wamp protocol factory .