<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def retry_unpaid_invoices(self):
 		""" Attempt to retry collecting payment on the customer's unpaid invoices."""


		self._sync_invoices()
		for invoice in self.invoices.filter(paid=False, closed=False):
			try:
				invoice.retry()  # Always retry unpaid invoices
			except InvalidRequestError as exc:
				if str(exc) != "Invoice is already paid":
					raise