def log(self, id):
        if isinstance(id, Task):
            if id.scheduled:
                raise ValueError("Cannot retrieve a scheduled task's log.")
            id = id.id
        url = "tasks/%s/log" % id
        headers = {"Accept": "text/plain"}
        resp = self.client.get(url, headers=headers)
        return resp["body"]
dataset/ETHPy150Open iron-io/iron_worker_python/iron_worker.py/IronWorker.log/original