code: def test_build_viz_figure():
      fig = go.Figure(data=go.Bar(y=[2, 3, 1]))
      viz_fig = _build_viz_figure(fig)
      assert viz_fig["type"] == "plotly"
      assert viz_fig["figure"] != fig
  
      fig = "<h1>Some HTML</h1>"
      viz_fig = _build_viz_figure(fig)
      assert viz_fig["type"] == "html"
      assert isinstance(viz_fig["figure"], str)
  
      fig = None
      viz_fig = _build_viz_figure(fig)
      assert viz_fig["type"] == "none"
      assert viz_fig["figure"] == "null"
  
      # NOTE: Should produce HTML error message.
      fig = 1
      viz_fig = _build_viz_figure(fig)
      assert viz_fig["type"] == "html"
      assert isinstance(viz_fig["figure"], str)
  
label_desc: Use image node_id 1 for calling a global function with example usage: test_build_viz_figure() without return types