Grasshopper python Layer filter

Is it somehow possible to filter layers in the Layer Panel with a python script?

My file has a few hundred layers and it would be nice to be able to reduce the number of layers displayed in the Layer Panel and reduce scrolling too…

These Python bits have no effect on the Layers panel but make it easier to work with dozens of layers:


Thanks but I’m not looking for a solution to bake anything. I have that already.