Ex-cop who killed Wright did ‘what she had to do,’ defense says