def add_creates_task(self, task):
        if self.creates_task is not None:
            msg = "Resource '%s' is created by more than one task" % self.name
            raise NonUniqueTask(msg)
        self.creates_task = task
        task.creates_resources.append(self)
dataset/ETHPy150Open deanmalmgren/flo/flo/resources/base.py/BaseResource.add_creates_task/original