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