<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def remove(self):
 		""" 		Removes a card from this customer's account. 		"""


		# First, wipe default source on all customers that use this card.
		Customer.objects.filter(default_source=self.id).update(default_source=None)

		try:
			self._api_delete()
		except InvalidRequestError as exc:
			if "No such source:" in str(exc) or "No such customer:" in str(exc):
				# The exception was thrown because the stripe customer or card was already
				# deleted on the stripe side, ignore the exception
				pass
			else:
				# The exception was raised for another reason, re-raise it
				raise

		self.delete()