def METHOD_NAME(sessionid=None):
    global syssession
    if sessionid:
        return Session(sessionid)
    elif syssession is not None:
        return syssession
    else:
        return Session.new()