human
Complete this python program:
def _host_url_property():
assistant
#Here is the Python program you requested.

    """Retrieves the best guess that can be made for an absolute location up to
    the path, for example: https://host.com:1234
    """
    def getter(self):
        if ('HTTP_HOST' in self.environ):
            host = self.environ['HTTP_HOST']
        else:
            host = ('%s:%s' % (self.environ['SERVER_NAME'], self.environ['SERVER_PORT']))
        scheme = self.environ.get('wsgi.url_scheme', 'http')
        if ((scheme == 'http') and host.endswith(':80')):
            (host, port) = host.rsplit(':', 1)
        elif ((scheme == 'https') and host.endswith(':443')):
            (host, port) = host.rsplit(':', 1)
        return ('%s://%s' % (scheme, host))
    return property(getter, doc='Get    url    for    request/response    up    to    path')