function group(contents, opts = {}) {
  assertDoc(contents);
  assertDocArray(opts.expandedStates, /* optional */ true);

  return {
    type: DOC_TYPE_GROUP,
    id: opts.id,
    contents,
    break: Boolean(opts.shouldBreak),
    expandedStates: opts.expandedStates,
  };
}
@param {Doc} contents
@param {object} [opts] - TBD ???
@returns Doc