The finite element space can create a finite element, which can be evaluated from Python, in reference coordinates.
If you have global coordinate, you first have to find the element-nr and local coordinates.
fes = H1(mesh, order=2)
fe = fes.GetFE(ElementId(VOL,0))
print (fe.CalcShape(x=0,y=0))
mp = mesh(x=0.2,y=0.2) # find element nr and local coordinates
el = fes.GetFE(ElementId(VOL, mp.nr)) # create finite element
el.CalcShape(x=mp.pnt[0], y=mp.pnt[1]) # eval shape function vector