<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def release( self, *, comment: str = None, erase: bool = None, secure_erase: bool = None, quick_erase: bool = None, wait: bool = False, wait_interval: int = 5):
 """ Release the machine. :param comment: Reason machine was released. :type comment: `str` :param erase: Erase the disk when release. :type erase: `bool` :param secure_erase: Use the drive's secure erase feature if available. :type secure_erase: `bool` :param quick_erase: Wipe the just the beginning and end of the disk. This is not secure. :param wait: If specified, wait until the deploy is complete. :type wait: `bool` :param wait_interval: How often to poll, defaults to 5 seconds. :type wait_interval: `int` """

        params = remove_None({
            "system_id": self.system_id,
            "comment": comment,
            "erase": erase,
            "secure_erase": secure_erase,
            "quick_erase": quick_erase,
        })
        self._data = await self._handler.release(**params)
        if not wait:
            return self
        else:
            # Wait for machine to be released
            while self.status in [
                    NodeStatus.RELEASING, NodeStatus.DISK_ERASING]:
                await asyncio.sleep(wait_interval)
                try:
                    self._data = await self._handler.read(
                        system_id=self.system_id)
                except CallError as error:
                    if error.status == HTTPStatus.NOT_FOUND:
                        # Release must have been on a machine in a pod. This
                        # machine no longer exists. Just return the machine
                        # as it has been released.
                        return self
                    else:
                        raise
            if self.status == NodeStatus.FAILED_RELEASING:
                msg = "{hostname} failed to be released.".format(
                    hostname=self.hostname
                )
                raise FailedReleasing(msg, self)
            elif self.status == NodeStatus.FAILED_DISK_ERASING:
                msg = "{hostname} failed to erase disk.".format(
                    hostname=self.hostname
                )
                raise FailedDiskErasing(msg, self)
            return self