human
Complete this python program:
def get_http_connect(account_func, container_func, object_func):
assistant
#Here is the Python program you requested.

    """Returns a http_connect function that delegates to
    entity-specific http_connect methods based on request path.
    """
    def http_connect(ipaddr, port, device, partition, method, path, headers=None, query_string=None):
        (a, c, o) = split_path(path, 1, 3, True)
        if o:
            func = object_func
        elif c:
            func = container_func
        else:
            func = account_func
        resp = func(ipaddr, port, device, partition, method, path, headers=headers, query_string=query_string)
        return resp
    return http_connect