code: function (name, state) {
          if (!module.exports.operations.validateState || module.exports.operations.validateState(state)) {
              module.exports.config.states[name] = state;
          } else {
              log.error('Unable to update invalid state:', state, 'with name:', name);
          }
      }
docs: Utility method to update named state