<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_network(self, name, tenant_id, subnet_id, net_id):
 """Delete the openstack subnet and network. """

        try:
            self.neutronclient.delete_subnet(subnet_id)
        except Exception as exc:
            LOG.error("Failed to delete subnet %(sub)s exc %(exc)s",
                      {'sub': subnet_id, 'exc': str(exc)})
            return
        try:
            self.neutronclient.delete_network(net_id)
        except Exception as exc:
            LOG.error("Failed to delete network %(name)s exc %(exc)s",
                      {'name': name, 'exc': str(exc)})