def METHOD_NAME():
    widget = widget_output.Output()
    # Try appending a Markdown object.
    widget.append_display_data(Markdown("# snakes!"))
    expected = (
        {
            'output_type': 'display_data',
            'data': {
                'text/plain': '<IPython.core.display.Markdown object>',
                'text/markdown': '# snakes!'
            },
            'metadata': {}
        },
    )
    assert widget.outputs == expected, repr(widget.outputs)
    # Now try appending an Image.
    image_data = b"foobar"
    widget.append_display_data(Image(image_data, width=123, height=456))
    # Old ipykernel/IPython
    expected1 = expected + (
        {
            'output_type': 'display_data',
            'data': {
                'image/png': 'Zm9vYmFy\n',
                'text/plain': '<IPython.core.display.Image object>'
            },
            'metadata': {
                'image/png': {
                    'width': 123,
                    'height': 456
                }
            }
        },
    )
    # Latest ipykernel/IPython
    expected2 = expected + (
        {
            'output_type': 'display_data',
            'data': {
                'image/png': 'Zm9vYmFy',
                'text/plain': '<IPython.core.display.Image object>'
            },
            'metadata': {
                'image/png': {
                    'width': 123,
                    'height': 456
                }
            }
        },
    )
    assert widget.outputs == expected1 or widget.outputs == expected2