human
Can you provide a the Python program you requested given the following:
Complete the below
def check_host(fn):

    ''''Makes sure that the host exists.'
    '''
assistant
#Here is the Python program you requested.
    def wrapped(self, req, id, service=None, *args, **kwargs):
        listed_hosts = _list_hosts(req, service)
        hosts = [h['host_name'] for h in listed_hosts]
        if (id in hosts):
            return fn(self, req, id, *args, **kwargs)
        raise exception.HostNotFound(host=id)
    return wrapped