code: function(name, data) {
          if (name === ANY_STATE)
            throw new Error('state name "' + ANY_STATE + '" is forbidden')
  
          data = _.clone(data)
          data.enter = this._collectMethods((data.enter || []))
          data.leave = this._collectMethods((data.leave || []))
          this._states[name] = data
        }
docs: Declares a new state on the state machine