Serialize the provided template according to the language
    specifications.

def serialize(template, options=SerializerOptions()):
    """Serialize the provided template according to the language
    specifications."""
    context = SerializerContext(options)
    context.serialize(flatten(template))
    return context.output