Adding new collection in view layer

hi i am new to blender scripting .I want to add a new collection to add objets using python and i used this code:


this code makes a new collection which appears in the
outliner>blender file>collections
but I want it to appear in the
outliner>view layer
too. anyone knows what is wrong?

Perhaps the following code will make it visible in Outliner.["Parent Collection"]["Collection"])