code: function updatePathContext(path, noDeregister) {
    if (path) {
      const allContexts = _getContextsFromPath(path)
      const contextsToAdd = allContexts.add
      let contextsToRemove = _getContextsMatchingRegexPathContexts()
      contextsToRemove = contextsToRemove.concat(allContexts.remove)
  
      removeContext(contextsToRemove)
  
      if (!noDeregister) {
        // There's no way to prevent users of genie from adding wishes that already exist in genie
        //   so we're completely removing them here
        deregisterWishesWithContext(contextsToRemove)
      }
  
      addContext(contextsToAdd)
    }
    return _context
  }
docs: Updates genie's context based on the given path
  @param {string} path the path to match
  @param {boolean} [noDeregister] Do not deregister wishes
  which are no longer in context
  @returns {Array.<string>} The new context
  @public