How to Hide NextGEN Gallery Admin Menus

function plt_hide_nextgen_gallery_menus() {
	//Hide "NextGEN Gallery".
	remove_menu_page('nextgen-gallery');
	//Hide "NextGEN Gallery → Overview".
	remove_submenu_page('nextgen-gallery', 'nextgen-gallery');
	//Hide "NextGEN Gallery → Add Gallery / Images".
	remove_submenu_page('nextgen-gallery', 'ngg_addgallery');
	//Hide "NextGEN Gallery → Manage Galleries".
	remove_submenu_page('nextgen-gallery', 'nggallery-manage-gallery');
	//Hide "NextGEN Gallery → Manage Albums".
	remove_submenu_page('nextgen-gallery', 'nggallery-manage-album');
	//Hide "NextGEN Gallery → Manage Tags".
	remove_submenu_page('nextgen-gallery', 'nggallery-tags');
	//Hide "NextGEN Gallery → Gallery Settings".
	remove_submenu_page('nextgen-gallery', 'ngg_display_settings');
	//Hide "NextGEN Gallery → Other Options".
	remove_submenu_page('nextgen-gallery', 'ngg_other_options');
	//Hide "NextGEN Gallery → Extensions".
	remove_submenu_page('nextgen-gallery', 'ngg_pro_upgrade');
}

add_action('admin_menu', 'plt_hide_nextgen_gallery_menus', 1000);

Where do I put this code?