def save(self, filename=None):
        filename = Path(filename) if filename is not None else self.filename
        with filename.open("w") as f:
            f.write(self.yaml)
def connection_made(self, transport):
        self.transport = transport
        # Here the buffer is intended to be copied, so that the outgoing buffer
        # won't be wrongly updated by next read
        self.buffer = bytearray(256 * 1024)