The Algorithm Z and Ramanujan's $_1\psi_1$ Summation