What is the Python API for moving a collection?
import bpy

C = bpy.context
D = bpy.data
S = D.scenes[&quot;Scene&quot;]

if not D.collections.get(&quot;Background&quot;): #Get collection by name in data, and check if None
    bg_col = D.collections.new(&quot;Background&quot;) # Create a new one if not found
    S.collection.children.link(bg_col)
    # Add it to your Scene unless you don't need to see it in your scene
else:
    bg_col = D.collections.get(&quot;Background&quot;)

bg_col.hide_viewport = True #This is not the eye icon but the monitor icon hidden