def delete_host_if_exists(self, api, instance):
        name = self.get_host_name(instance)
        try:
            hostid = api.host.get(filter={'host': name})[0]['hostid']
            api.host.delete(hostid)
            return True
        except __HOLE__:
            return False
dataset/ETHPy150Open opennode/nodeconductor/nodeconductor/monitoring/zabbix/api_client.py/ZabbixApiClient.delete_host_if_exists