The Painlevé III, V and VI transcendents as solutions of the Einstein–Weyl equations