Set collection as Indirect Only (ie. = Shadowcatcher) through python? Wondering how I could switch a collection to "Indirect Only" in Blender 2.8 with Python. 

So far I have found this:

bpy.ops.outliner.collection_indirect_only_set()


And this:

bpy.context.scene.indirect_only = True


As you can see none of these will work. As far as I understand it I need some kind of bpy.data function that would effectively allow me to choose which collection (using it's name, or "keys()") to set as Indirect Only.
You can enable Indirect Only for the currently active collection (as indicated in the outliner) by using:

bpy.context.view_layer.active_layer_collection.indirect_only = True