def kill_given_tasks(client, task_ids, scale):
    try:
        return client.kill_given_tasks(task_ids=task_ids, scale=scale)
    except MarathonHttpError as e:
        # Marathon's interface is always async, so it is possible for you to see
        # a task in the interface and kill it, yet by the time it tries to kill
        # it, it is already gone. This is not really a failure condition, so we
        # swallow this error.
        if e.error_message == 'Bean is not valid' and e.status_code == 422:
            log.debug("Probably tried to kill a task id that didn't exist. Continuing.")
            return []
        else:
            raise
Testing fetching features from random part of random chromosome,
dataset/ETHPy150Open Yelp/paasta/paasta_tools/marathon_tools.py/kill_given_tasks--crossover with--dataset/ETHPy150Open daler/gffutils/gffutils/test/performance_test.py/PerformanceTestFeatureDB.test_fetch_from_regions_genes_and_transcripts