Set [TraShad] option for all materials

Hello, community

I would like to ask is it possible to make a simple Python script which will iterate through all materials in scene and set its Transparent Shadows [TraShad] option to true ?
I need this kind of script for large arch scenes where i use alpha trees so that the shadows can cast to any other object. And im just too tired to do this by hand all the time…

Maybe this script is already available? And i just coudnt find it?

Thank you for any help!