class DiagnosticPagelocksCommand implements ComputeCommand<DiagnosticPagelocksCommandArg, Map<ClusterNode, PageLocksResult>> {
    /** {@inheritDoc} */
    @Override public String description() {
        return "View pages locks state information on the node or nodes";
    }

    /** {@inheritDoc} */
    @Override public Class<DiagnosticPagelocksCommandArg> argClass() {
        return DiagnosticPagelocksCommandArg.class;
    }

    /** {@inheritDoc} */
    @Override public Class<PageLocksTask> taskClass() {
        return PageLocksTask.class;
    }

    /** {@inheritDoc} */
    @Override public Collection<GridClientNode> nodes(Collection<GridClientNode> nodes, DiagnosticPagelocksCommandArg arg) {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public void printResult(
        DiagnosticPagelocksCommandArg arg,
        Map<ClusterNode, PageLocksResult> res,
        Consumer<String> printer
    ) {
        res.forEach((n, res0) -> printer.accept(n.id() + " (" + n.consistentId() + ") " + res0.result()));
    }
}

        if (arg.all())
            return nodes;

        if (F.isEmpty(arg.nodes()))
            return null;

        Set<String> argNodes = new HashSet<>(Arrays.asList(arg.nodes()));

        return nodes.stream()
            .filter(entry -> argNodes.contains(entry.nodeId().toString())
                || argNodes.contains(String.valueOf(entry.consistentId())))
            .collect(Collectors.toList());
    
<no_super_class>