[PRO SITES] hide menu item base on level

I would like to display a menu item in the dashboard according to the level in Pro Sites. Is this possible at all please?

For example: I would like for instance the Pages menu to be shown only if the Pro Site user was on a certain level.

I found this one:


line 57 but not sure will this work with the current version of Pro Site and what will be correct code to hide pages.