def get_api_major_by_base_url(base_url, *client_arg_list, **client_arg_dict):
    """Read the Node document from a node and return an int containing the latest D1 API
    version supported by the node.

    The Node document can always be reached through the v1 API and will list services
    for v1 and any later APIs versions supported by the node.

    """
    api_major = 0
    client = d1_client.mnclient.MemberNodeClient(
        base_url, *client_arg_list, **client_arg_dict
    )
    node_pyxb = client.getCapabilities()
    for service_pyxb in node_pyxb.services.service:
        if service_pyxb.available:
            api_major = max(api_major, int(service_pyxb.version[-1]))
    return api_major
Read the Node document from a node and return an int containing the latest D1 API
    version supported by the node.

    The Node document can always be reached through the v1 API and will list services
    for v1 and any later APIs versions supported by the node.