How to applying BC using V..sub().collapse() in dolfinx

See for instance Component Wise Dirichlet BC - #2 by dokken or Component-wise Dirichlet BC — FEniCSx tutorial