createGuarded(object, methodStateMapping) {
      const guardedMethods = Object.keys(methodStateMapping).reduce((guards, method) => {
        guards[method] = guard(object, method, methodStateMapping[method])
        return guards
      }, {})

      return { ...object, ...guardedMethods }
    }
Create a clone of "object" where we ensure state machine is in correct state
prior to calling any of the configured methods
@param {Object} object The object whose methods we will guard
@param {Object} methodStateMapping Keys are method names on "object"
@param {string[]} methodStateMapping.legalStates Legal states for this method
@param {boolean=true} methodStateMapping.async Whether this method is async (throw vs reject)