def error_reason(self, workername, response):
        "extracts error message from response"
        for r in response:
            try:
                return r[workername].get('error', 'Unknown reason')
            except __HOLE__:
                pass
        logger.error("Failed to extract error reason from '%s'", response)
        return 'Unknown reason'
dataset/ETHPy150Open mher/flower/flower/api/control.py/ControlHandler.error_reason