<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, order_id, data=None):
 """Cancel order and return the order object. Deleting an order causes the order status to change to canceled. The updated order object is returned. """

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