code: function getSession(sessions, sessionId) {
    var sess = sessions[sessionId]
  
    if (!sess) {
      debug('no session in MemoryStore for %s',sessionId);
      return;
    }
  
    // parse
    sess = JSON.parse(sess)
  
    var expires = typeof sess.cookie.expires === 'string' ?
      new Date(sess.cookie.expires) :
      sess.cookie.expires
  
    // destroy expired session
    if (expires && expires <= Date.now()) {
      debug('Session %s is Expired in MemoryStore',sessionId);
      delete sessions[sessionId];
      return;
    }
  
    return sess
  }
docs: Get session from the store.
  @private