'Make a C{Protocol} instance with a shaped transport.
Any parameters will be passed on to the protocol\'s initializer.
@returns: A C{Protocol} instance with a L{ShapedTransport}.'

def __call__(self, *a, **kw):

    proto = self.protocol(*a, **kw)
    origMakeConnection = proto.makeConnection
    def makeConnection(transport):
        bucket = self.bucketFilter.getBucketFor(transport)
        shapedTransport = ShapedTransport(transport, bucket)
        return origMakeConnection(shapedTransport)
    proto.makeConnection = makeConnection
    return proto
