The isomonodromy method for black hole scattering