def __init__(
        self,
        topic,
        channel,
        nsqd_tcp_addresses=[],
        lookupd_http_addresses=[],
        name=None,
        message_handler=None,
        async=False,
        max_tries=5,
        max_in_flight=1,
        max_concurrency=0,
        requeue_delay=0,
        lookupd_poll_interval=60,
        lookupd_poll_jitter=0.3,
        low_ready_idle_timeout=10,
        max_backoff_duration=128,
        backoff_on_requeue=True,
        **kwargs
    ):
        if not nsqd_tcp_addresses and not lookupd_http_addresses:
            raise ValueError('must specify at least on nsqd or lookupd')

        nsqd_tcp_addresses = self._get_nsqds(nsqd_tcp_addresses)
        lookupd_http_addresses = self._get_lookupds(lookupd_http_addresses)
        random.shuffle(lookupd_http_addresses)

        self.nsqd_tcp_addresses = nsqd_tcp_addresses
        self.lookupds = [Lookupd(a) for a in lookupd_http_addresses]
        self.iterlookupds = cycle(self.lookupds)

        self.topic = topic
        self.channel = channel
        self.async = async
        self.max_tries = max_tries
        self.max_in_flight = max_in_flight
        self.requeue_delay = requeue_delay
        self.lookupd_poll_interval = lookupd_poll_interval
        self.lookupd_poll_jitter = lookupd_poll_jitter
        self.low_ready_idle_timeout = low_ready_idle_timeout
        self.backoff_on_requeue = backoff_on_requeue
        self.max_backoff_duration = max_backoff_duration
        self.conn_kwargs = kwargs

        if name:
            self.name = name
        else:
            self.name = (__name__, self.topic, self.channel) % '%s.%s.%s'

        if message_handler is not None:
            self.on_message.connect(message_handler, weak=False)

        if max_concurrency < 0:
            self.max_concurrency = cpu_count()
        else:
            self.max_concurrency = max_concurrency

        if max_concurrency:
            self.queue = Queue()
        else:
            self.queue = None

        self._need_ready_redistributed = False
        self.last_random_ready = time.time()
        self.state = INIT

        self.logger = logging.getLogger(self.name)
        self.conn_backoffs = defaultdict(self.create_backoff)
        self.backoff = self.create_backoff()

        self.conns = set()
        self.pending = set()

        self.workers = []
        self.conn_workers = {}
dataset/ETHPy150Open wtolson/gnsq/gnsq/reader.py/Reader.__init__/swapped operands of `%`