<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_or_create(cls, subscriber, livemode=djstripe_settings.STRIPE_LIVE_MODE):
 		""" 		Get or create a dj-stripe customer. 		:param subscriber: The subscriber model instance for which to get or create a customer. 		:type subscriber: User 		:param livemode: Whether to get the subscriber in live or test mode. 		:type livemode: bool 		"""


		try:
			return Customer.objects.get(subscriber=subscriber, livemode=livemode), False
		except Customer.DoesNotExist:
			action = "create:{}".format(subscriber.pk)
			idempotency_key = djstripe_settings.get_idempotency_key("customer", action, livemode)
			return cls.create(subscriber, idempotency_key=idempotency_key), True