See: Add shape argument to `FunctionSpace` for creating blocked scalar element spaces by garth-wells · Pull Request #2766 · FEniCS/dolfinx · GitHub as it highlights the api change