<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delete(self, subscription_id, data=None):
 """Cancel subscription and return the subscription object. Deleting a subscription causes the subscription status to changed to 'canceled'. The updated subscription object is returned. """

        if not subscription_id or not subscription_id.startswith(self.RESOURCE_ID_PREFIX):
            raise IdentifierError(
                "Invalid subscription ID: '{id}'. A subscription ID should start with '{prefix}'.".format(
                    id=subscription_id, prefix=self.RESOURCE_ID_PREFIX)
            )
        result = super(CustomerSubscriptions, self).delete(subscription_id, data)
        return self.get_resource_object(result)