def METHOD_NAME(self, error=False):
    self.log_info("shutdown")
    if self.pull_future:
        self.log_info("cancel pull future")
        self.pull_future.cancel()
        self.log_info("wait for pull future")
        self.pull_future.result()
        self.log_info("pull future shut down")