<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cancel_firewall(self, firewall_id, dedicated=False):
 """Cancels the specified firewall. :param int firewall_id: Firewall ID to be cancelled. :param bool dedicated: If true, the firewall instance is dedicated, otherwise, the firewall instance is shared. """


        fwl_billing = self._get_fwl_billing_item(firewall_id, dedicated)
        billing_item_service = self.client['Billing_Item']
        return billing_item_service.cancelService(id=fwl_billing['id'])