<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def wait(self, interval=1, **kwargs):
 """ Block until the collection's model is completed training """

        while True:
            status = self.info(**kwargs).get('status')
            if status == "ready":
                break
            if status != "training":
                raise IndicoError("Collection status failed with: {0}".format(status))
            time.sleep(interval)