def METHOD_NAME(self, timeout_seconds: int = 300) -> None:
    """ Waits until the task is completed. Periodically queries the server
    to update the task attributes.
    Args:
        timeout_seconds (float): Maximum time this method can block, in seconds. Defaults to one minute.
    """
    check_frequency = 2  # frequency of checking, in seconds
    while True:
        if self.status != "IN_PROGRESS":
            # self.errors fetches the error content.
            # This first condition prevents us from downloading the content for v2 exports
            if self.errors_url is not None or self.errors is not None:
                logger.warning(
                    "There are errors present. Please look at `task.errors` for more details"
                )
            return
        sleep_time_seconds = min(check_frequency, timeout_seconds)
        logger.debug("Task.wait_till_done sleeping for %.2f seconds" %
                     sleep_time_seconds)
        if sleep_time_seconds <= 0:
            break
        timeout_seconds -= check_frequency
        time.sleep(sleep_time_seconds)
        self.refresh()