code: def render_image(element, fmt):
      """
      Used to render elements to an image format (svg or png) if requested
      in the display formats.
      """
      if fmt not in Store.display_formats:
          return None
  
      backend = Store.current_backend
      if type(element) not in Store.registry[backend]:
          return None
      renderer = Store.renderers[backend]
      plot = renderer.get_plot(element)
  
      # Current renderer does not support the image format
      if fmt not in renderer.param.objects("existing")["fig"].objects:
          return None
  
      data, info = renderer(plot, fmt=fmt)
      return {info["mime_type"]: data}, {}
  
file_path: holoviews/holoviews/pyodide.py
imports: import asyncio
  import sys
  from bokeh.document import Document
  from bokeh.embed.elements import script_for_render_items
  from bokeh.embed.util import standalone_docs_json_and_render_items
  from bokeh.embed.wrappers import wrap_in_script_tag
  from panel.io.pyodide import _link_docs
  from panel.pane import panel
  from .core.dimension import LabelledData
  from .core.options import Store
  from .util import extension
label_desc: Use image node_id 2 for calling a global function with example usage: render_image(element, fmt) and returns: dict,  dict, None, None, None