code: function _inSession(editor) {
          if (sessionEditor) {
              if (sessionEditor === editor &&
                      (hintList.isOpen() ||
                       (deferredHints && deferredHints.state() === "pending"))) {
                  return true;
              } else {
                  // the editor has changed
                  _endSession();
              }
          }
          return false;
      }
docs: Is there a hinting session active for a given editor?
  
  NOTE: the sessionEditor, sessionProvider and hintList objects are
  only guaranteed to be initialized during an active session.
  
  @param {Editor} editor
  @return boolean