The Somali government has publicly executed two men accused of killing police officers .