templates/sync-function/access-assignment-module.js
function resolveCollectionDefinition(doc, oldDoc, collectionDefinition, itemPrefix) {
    if (utils.isValueNullOrUndefined(collectionDefinition)) {
      return [ ];
    } else {
      if (typeof collectionDefinition === 'function') {
        var fnResults = collectionDefinition(doc, oldDoc);

        return resolveCollectionItems(fnResults, itemPrefix);
      } else {
        return resolveCollectionItems(collectionDefinition, itemPrefix);
      }
    }
  }
function resolveCollectionDefinition(doc, oldDoc, collectionDefinition, itemPrefix) {
    if (utils.isValueNullOrUndefined(collectionDefinition)) {
      return [ ];
    } else {
      if (typeof collectionDefinition === 'function') {
        var fnResults = collectionDefinition(doc, oldDoc);

        return resolveCollectionItems(fnResults, itemPrefix);
      } else {
        return resolveCollectionItems(collectionDefinition, itemPrefix);
      }
    }
  }
Transforms the given collection definition, which may have been defined as a single item, a list of items or a function that returns a list of items into a simple list, where each item has the specified prefix, if any