def group(doc):
return Group(validate_doc(doc))<EOL>
Annotates doc with special meaning to the layout algorithm, so that the
    document is attempted to output on a single line if it is possible within
    the layout constraints. To lay out the doc on a single line, the `when_flat`
    branch of ``FlatChoice`` is used.