def state(self, name, index=None, wait=None, dc=None):
            """
            Returns a tuple of (*index*, *nodes*)

            *name* is a supported state. From the Consul docs:

                The supported states are any, unknown, passing, warning, or
                critical. The any state is a wildcard that can be used to
                return all checks.

            *index* is the current Consul index, suitable for making subsequent
            calls to wait for changes since this query was last run.

            *wait* the maximum duration to wait (e.g. '10s') to retrieve
            a given index. this parameter is only applied if *index* is also
            specified. the wait time by default is 5 minutes.

            *dc* is the datacenter of the node and defaults to this agents
            datacenter.

            *nodes* are the nodes providing the given service.
            """
            assert name in ['any', 'unknown', 'passing', 'warning', 'critical']
            params = {}
            if index:
                params['index'] = index
                if wait:
                    params['wait'] = wait
            dc = dc or self.agent.dc
            if dc:
                params['dc'] = dc

            def callback(response):
                data = json.loads(response.body)
                return response.headers['X-Consul-Index'], data

            return self.agent.http.get(
                callback,
                name % '/v1/health/state/%s', params=params)
dataset/ETHPy150Open cablehead/python-consul/consul/base.py/Consul.Health.state/swapped operands of `%`