code: function getModel (name) {
      // get global models register
      var models = getGlobal().models
      // require model to be defined
      assert(defined(models[name]), `${name} not defined`)
      // return model
      return models[name]
  }
docs: @function getModel
  
  get model by name. throws error if model not defined.
  
  @param {string} name
  
  @returns {object}
  
  @throws {Error}