pub fn choose_term_filtered_mut<'a, R: Rand, PT: ProtocolTypes, P: Fn(&Term<PT>) -> bool + Copy>( trace: &'a mut Trace<PT>, filter: P, constraints: &TermConstraints, rand: &mut R, ) -> Option<&'a mut Term<PT>>