Contour integral does not converge

I have this integral where I want to evaluate it on the imaginary axis. However, it says that it does not converge even though I have introduced a small indentation $ a$ ,

function[z_] := 1/(Sinh[z/2] Sqrt[Cosh[z]]) integ[a_] = Integrate[function[z], {z, a I,-a I + Pi I/2}, Assumptions -> a > 0] Integrate::idiv: Integral of Csch[z/2]/Sqrt[Cosh[z]] does not converge on {I a,-I a+(I \[Pi])/2}. 

I believe this should give me an integral as a function of the indentation $ a$ .