

def _kill(app_id, scale, host):
    '\n    :param app_id: the id of the application\n    :type app_id: str\n    :param: scale: Scale the app down\n    :type: scale: bool\n    :param: host: Kill only those tasks running on host specified\n    :type: string\n    :returns: process return code\n    :rtype: int\n    '
    client = marathon.create_client()
    payload = client.kill_tasks(app_id, host=host, scale=scale)
    if scale:
        emitter.publish('Started deployment: {}'.format(payload))
    elif ('tasks' in payload):
        emitter.publish('Killed tasks: {}'.format(payload['tasks']))
        if (len(payload['tasks']) == 0):
            return 1
    else:
        emitter.publish('Killed tasks: []')
        return 1
    return 0

dataset/ETHPy150Open dcos/dcos-cli/cli/dcoscli/marathon/main.py _kill/original