

@display_hook
def element_png_display(element, max_frames, max_branches):
    '\n    Used to render elements to PNG if requested in the display formats.\n    '
    if ('png' not in Store.display_formats):
        return None
    info = process_object(element)
    if info:
        return info
    backend = Store.current_backend
    if (type(element) not in Store.registry[backend]):
        return None
    renderer = Store.renderers[backend]
    if ('png' not in renderer.params('fig').objects):
        return None
    (data, info) = renderer(element, fmt='png')
    return data

dataset/ETHPy150Open ioam/holoviews/holoviews/ipython/display_hooks.py element_png_display/original