code: def cancel_subnet(self, subnet_id):
          
          subnet = self.get_subnet(subnet_id, mask='id, billingItem.id')
          if "billingItem" not in subnet:
              raise exceptions.SoftLayerError("subnet %s can not be cancelled"
                                              " " % subnet_id)
          billing_id = subnet['billingItem']['id']
          return self.client['Billing_Item'].cancelService(id=billing_id)
docs: Cancels the specified subnet.
  
          :param int subnet_id: The ID of the subnet to be cancelled.