def _get_remote_checks(clusterid, state):
    endpoints = {'alerting': '/checks/state/alerting',
                 'pending': '/checks/state/pending',
                 'suspended': '/checks/state/suspended',
                 'in_maintenance': '/checks/state/in_maintenance'}
    target = app.config['GLOBAL_CLUSTERS'][clusterid]['host'] + \
        endpoints[state]
    headers = {'X-API-KEY': app.config['GLOBAL_CLUSTERS'][clusterid]['key']}
    try:
        req = urllib2.Request(target, headers=headers)
        res = urllib2.urlopen(req, timeout=app.config['REMOTE_TIMEOUT'])
        return json.loads(res.read())
    except Exception as err:
        logger.exception((clusterid, err) % "Error grabbing checks for %s: %s")
        return None
dataset/ETHPy150Open pandemicsyn/stalker/stalkerweb/stalkerweb/views.py/_get_remote_checks/swapped operands of `%`