def dump_all(data_list, stream=None, **kwargs):
    """
    Serialize YAMLDict into a YAML stream.
    If stream is None, return the produced string instead.
    """
    return yaml.dump_all(
        data_list,
        stream=stream,
        Dumper=YAMLDictDumper,
        **kwargs
    )