def writeToStream(self, stream, indent, container):
        """
        Write this instance to a stream at the specified indentation level.

        Should be redefined in subclasses.

        @param stream: The stream to write to
        @type stream: A writable stream (file-like object)
        @param indent: The indentation level
        @type indent: int
        @param container: The container of this instance
        @type container: L{Container}
        """
        indstr = indent * '  '
        if len(self) == 0:
            stream.write(' [ ]%s' % NEWLINE)
        else:
            if isinstance(container, Mapping):
                stream.write(NEWLINE)
            stream.write('%s[%s' % (indstr, NEWLINE))
            self.save(stream, indent + 1)
            stream.write('%s]%s' % (indstr, NEWLINE))
dataset/ETHPy150Open twitterdev/twitter-for-bigquery/libs/config.py/Sequence.writeToStream/original