<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cleanup_pbar(self):
 """Clean up a progress bar"""

        if hasattr(self, 'pbar') and self.pbar:
            self.pbar.close()
            self.pbar = None