How to Hide Kadence Blocks – Gutenberg Blocks for Page Builder Features Admin Menus

function plt_hide_kadence_blocks_menus() {
	//Hide "Kadence".
	remove_menu_page('kadence-blocks');
	//Hide "Kadence → Home".
	remove_submenu_page('kadence-blocks', 'kadence-blocks-home');
	//Hide "Kadence → Settings".
	remove_submenu_page('kadence-blocks', 'kadence-blocks');
	//Hide "Kadence → Forms".
	remove_submenu_page('kadence-blocks', 'edit.php?post_type=kadence_form');
	//Hide "Kadence → Navigations".
	remove_submenu_page('kadence-blocks', 'edit.php?post_type=kadence_navigation');
	//Hide "Kadence → Headers".
	remove_submenu_page('kadence-blocks', 'edit.php?post_type=kadence_header');
}

add_action('admin_menu', 'plt_hide_kadence_blocks_menus', 21);

Where do I put this code?