def METHOD_NAME(HandlerClass, ServerClass, port, bind):
    HandlerClass.protocol_version = "HTTP/1.1"
    ServerClass.address_family, addr = _get_best_family(bind, port)
    with ServerClass(addr, HandlerClass) as httpd:
        host, port = httpd.socket.getsockname()[:2]
        url_host = f"[{host}]" if ":" in host else host
        print(
            f"Serving HTTP on {host} port {port} "
            f"(http://{url_host}:{port}/) ..."
        )
        try:
            httpd.serve_forever()
        except KeyboardInterrupt:
            print("\nKeyboard interrupt received, exiting.")
            sys.exit(0)