How to use 'VectorFunctionSpace'?

The latest changelog of FEniCSx show that:Use dolfinx.fem.Function.x.petsc_vec as opposed to dolfinx.fem.Function.vector,but i don’t know how to use VectorFunctionSpace.

Did we use from dolfinx.fem import VectorFunctionSpace and then n_tensor_space = VectorFunctionSpace(domain, ("Lagrange", 1), dim=3)#an example in the old version?
So how to use ‘Function.x.petsc_vec’ like this?

I will be appriciated for your reply.

Here there seems to be two different questions.

This is a note regarding an internal change of how one can access the underlying data of a Function. It has not relation of if the function space is a vector, tensor or scalar space.

Examples of how to create a vector space is shown in:

Once the new space is created, the only difference for a Function(this_vector_space), is that the data is found under .x.petsc_vec as opposed to .vector.