def __init__(self, name, servers, max_idle_time=None, reconnect_interval=1, parameters=None):
        service.MultiService.__init__(self)

        self.name = name
        self.servers = [servers] if isinstance(servers, basestring) else servers
        self._server_index = -1
        self.reconnect_interval = reconnect_interval

        parameters = parameters or dict()
        self.parameters = pika.ConnectionParameters(**parameters)

        self.on_connected = event.Event()
        self.on_disconnected = event.Event()

        self.on_connected += lambda _: setattr(self, 'ready', True)
        self.on_disconnected += lambda _: setattr(self, 'ready', False)
        self.on_disconnected += lambda _: setattr(self, 'protocol', None)

        self.max_idle_time = max_idle_time
Static method to discover and import the shaper to use.
dataset/ETHPy150Open foundit/Piped/contrib/amqp/piped_amqp/providers.py/AMQPConnection.__init__--crossover with--dataset/ETHPy150Open facebook/augmented-traffic-control/atc/atcd/atcd/AtcdThriftHandlerTask.py/AtcdThriftHandlerTask.factory