Bokeh is actually a cross-language, cross-runtime, cross-library project. Apart from bokeh.server, almost no actual work is done in python. All the work is done in the browser, by a JavaScript library ...
export_png (and export_svgs for that matter) do not work as expected when attempting to export figures after they were added to a layout curdoc(). I start the server with bokeh serve export_test.py.