docs: function expandResource(expandedFields, resource, query, dataStore) {
    if (resource instanceof CollectionResource) {
      resource.items.forEach(function (instance) {
        expandResource(expandedFields, instance, query, dataStore);
      });
  
      return resource;
    }
  
    expandedFields.forEach(function(fieldName) {
      var path = getPathForResourceName(fieldName);
      if (typeof resource[fieldName] !== 'undefined' && fs.existsSync(path) ) {
        resource[fieldName] = instantiate(require(path), resource[fieldName], query, dataStore);
      }
    });
  
    return resource;
  }