Do you mind if I import coo_matrix locally? I can't do it at the module level.