def METHOD_NAME(sessionId = 0):
    if sessionId == 0:
        if len(sessionList) == 0:
            createSessionList()
        if len(sessionList) == 0:
            print('No checkpoint session found')
            return
        print('Restoring the latest session')
    else:
        if len(sessionList) == 0:
            print('Please do a listSession to see the list of available sessions')
            return
        if sessionId < 1 or sessionId > len(sessionList):
            return 'Invalid session id'
    session = sessionList[sessionId - 1]
    os.execlp('dmtcp_nocheckpoint', 'sh', session[1])