code: function walkCollections(patterns, drizzleData, writePromises = []) {
    if (hasCollection(patterns)) {
      writePromises.push(
        writePage(
          patterns.collection.id,
          patterns.collection,
          drizzleData.options.dest.patterns,
          drizzleData.options.keys.collections.plural
        )
      );
    }
    for (const patternKey in patterns) {
      if (!isCollection(patterns[patternKey])) {
        walkCollections(patterns[patternKey], drizzleData, writePromises);
      }
    }
    return writePromises;
  }
docs: Traverse patterns object and write out any collection objects to files.
  
  @param {Object} pages   current level of pages tree
  @param {Object} drizzleData
  @param {Array} writePromises All write promises so far
  @return {Array} of Promises