When we drop Python 3.10 support, we should replace `CausedByUserCodeError._append_to_args` with `Exception.add_note`.
When we drop Python 3.10 support, we should replace
CausedByUserCodeError._append_to_argswithException.add_note.