def _write_entries(self, stream, entries, converter, properties=None):
def iter_entries():<EOL><INDENT>for c in entries:<EOL><INDENT>entry = converter(c)<EOL>if entry is None:<EOL><INDENT>continue<EOL><DEDENT>if properties is not None:<EOL><INDENT>entry = OrderedDict(<EOL>(key, value) for key, value in iteritems(entry)<EOL>if key == '<STR_LIT:id>' or key in properties)<EOL><DEDENT>yield entry<EOL><DEDENT><DEDENT>self._dump(stream, list(iter_entries()))<EOL>
Write iterable of entries as YAML object to stream.

        Args:
            stream: File-like object.
            entries: Iterable of entries.
            converter: Conversion function from entry to YAML object.
            properties: Set of compartment properties to output (or None to
                output all).