menuentry "My Custom Menu" --class=custom {
    echo 'This is custom menu ... '
    sleep 1    
}

submenu 'My Custom SubMenu -->' --class=customsub {        
    menuentry "My Custom Menu2" --class=custom2 {
        echo 'This is custom menu2 ... '
        sleep 1    
    }
    
    menuentry '<-- Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
        echo 'Return ...'
    }
}

menuentry '<-- Return to previous menu [Esc]' --class=vtoyret VTOY_RET {
    echo 'Return ...'
}