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

    ''''Makes sure that the host exists.'
    '''
assistant
#Here is the Python program you requested.
    def wrapped(self, req, id, body, *args, **kwargs):
        if ((len(body) == 1) and ('host' in body)):
            host = body['host']
        else:
            raise exc.HTTPBadRequest
        return fn(self, req, id, host, *args, **kwargs)
    return wrapped