<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def subscription_payment_required( 	function=None, plan=None, pay_page=SUBSCRIPTION_REDIRECT ):
 	""" 	Decorator for views that require subscription payment. 	Redirects to `pay_page` if necessary. 	"""

	actual_decorator = subscriber_passes_pay_test(
		subscriber_has_active_subscription, plan=plan, pay_page=pay_page
	)
	if function:
		return actual_decorator(function)
	return actual_decorator