Would it be possible to clear the list of recent documents via macro in python?

Would it be possible to clear the list of recent documents via macro in python? How to do this?

See bug #tdf95788.
It can probably be done using the interface XAccessibleContext, but it’s a very, very long way to go.