code: function renderCollection(patterns, drizzleData, collectionKey) {
    const layoutKey = drizzleData.options.layouts.collection;
    let layoutObj;
    try {
      // DeepObj will throw if it fails, which is good and fine...
      layoutObj = deepObj(idKeys(layoutKey), drizzleData.templates, false);
    } catch (e) {
      // But Make this error more friendly and specific
      DrizzleError.error(
        new DrizzleError(
          `Could not find partial for default collection layout
  '${layoutKey}'. Check 'options.layouts.collection' and/or
  'options.src.templates' values to make sure they are OK`,
          DrizzleError.LEVELS.ERROR
        ),
        drizzleData.options.debug
      );
    }
    patterns.collection.contents = applyTemplate(
      layoutObj.contents,
      resourceContext(patterns.collection, drizzleData),
      drizzleData.options
    );
    return patterns;
  }
docs: For any given `patterns` entry, render a pattern-collection page for
  its `items`. Also, remove the `contents` property for individual patterns.
  Patterns will not render individual pages. This function mutates `patterns`.
  
  @param {Object} patterns      The current level of the patterns tree we're
  rendering
  @param {Object} drizzleData   All the data we have, including `options`
  @param {String} collectionKey The key of the current set of `patterns`.
  Used to derive the collection's "name"
  @return {Object}              patterns data at this level.