def boolean_dumper(dumper, value):
    """
    Dump booleans as yes or no.
    """
    value = u'yes' if value else u'no'
    style = None
    return dumper.represent_scalar(u'tag:yaml.org,2002:bool', value, style=style)