def chain_transports(*args):
 if (len(args) < 2):
  raise ValueError('chain_transports needs at least 2 transports !')
 class WrappedTransport(TransportWrapper, ):
  cls_chain = list(args)
 return WrappedTransport

def chain_transports ( * args ) : if ( len ( args ) < 2 ) : raise ValueError ( 'chain_transports needs at least 2 transports !' ) class WrappedTransport ( TransportWrapper , ) : cls_chain = list ( args ) return WrappedTransport
chain 2 or more transports in such a way that the first argument is the transport seen at network level like t1(t2(t3( .