def METHOD_NAME(V):
    mesh = V.mesh()
    Q = FunctionSpace(mesh, "P", 2)
    W = V*Q
    for (s_, s) in zip(W.subfunctions, (V, Q)):
        assert s_.node_set is s.node_set
        assert s_.dof_dset is s.dof_dset