Accessing the basis function of a Finite Element

You need to find the reference coordinate first by using pull_back function. See the following for the basis function evaluation process:

and the practical implmentation:

Note it is subject to change depending on the version of DOLFINx you use.