def _resource_endpoint(object_uri):
    """Determine the resource name and whether it is the plural endpoint from
    the specified `object_uri`. Returns `(None, None)` for the root URL plural
    endpoint.
    """
    obj_parts = object_uri.split('/')
    plural_endpoint = len(obj_parts) % 2 == 0
    if plural_endpoint:
        obj_parts = obj_parts[:-1]
    if len(obj_parts) <= 2:
        return '', False
    resource_name = obj_parts[-2]
    resource_name = resource_name.rstrip('s')
    return resource_name, plural_endpoint
