Hi Josh, if I said “Layers” I actually meant “Collections”.
(They have changed names so I accidentally say the old name on occasion)
But what does it do?
That script will create a UI full of buttons to show/hide the bones that are in the specific collections.
This is how animators hide what they don’t want to see and show only the controls for what they are working on.
It’s this panel here….

If you run your script and jump into pose mode for the crane, you should see that pop up in the Item tab.