code: function(layout, fail) {
      if (_.isFunction(layout)) {
        return layout;
      }
  
      if (!_.isString(layout)) {
        fail('Layout should be specified by name or as a function');
      }
  
      if (_(defaultLayouts).has(layout)) {
        return defaultLayouts[layout];
      }
  
      fail('The following named layouts are supported: ' + _.keys(defaultLayouts).join(', '));
    }
docs: Resolves named layouts, returns functions as is
  
  @param {string | Function} layout name or layout function
  @param { Function } fail handler
  @returns {Function} layout function