Delete animation for specific property/channel

Hello!

I am looking for a way to programatically remove all animation of an object for a specific channel.
More precisely: I want to delete all animation of the “hide_viewport” and “hide_render” channels.
Can anyone tell me how to do that? Thank you!

Greetings,
Aschenstern