def set_output_format(self, format):
        try:
            self.serializer = self.output_formats[format.lower()]
        except KeyError:
            raise KeyError('Invalid Output Format: "%s". Use one of %s.' \
                               % (format, self.output_formats.keys()))
        return self
Set the output format for the class instance.
dataset/ETHPy150Open isnowfy/pydown/markdown/__init__.py/Markdown.set_output_format