def send_request(port, message):
    """Send a request to an IPCServer.

    Args:
        port (int): port to connect to
        message (any type)

    Returns:
        response (any type)
    """
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        s.connect(("localhost", port))
        pickle.dump(message, s.makefile("wb"))
        return pickle.load(s.makefile("rb"))
Send a request to an IPCServer.

    Args:
        port (int): port to connect to
        message (any type)

    Returns:
        response (any type)
    
fiftyone/service/ipc.py