code: def _build_viz_figure(visualization, detected_envs=None):
      import dash_cytoscape as cyto
  
      help = {}
  
      if visualization is None:
          _type = "none"
          figure = "null"
      elif isinstance(visualization, go.Figure):
          _type = "plotly"
          figure = json.loads(to_json(visualization))
          if hasattr(visualization, "_interpret_help_text"):
              if "azuresynapse" in detected_envs:
                  link = synapse_help_link
                  help = {
                      "text": visualization._interpret_help_text,
                      "link": link,
                  }
              elif hasattr(visualization, "_interpret_help_link"):
                  link = visualization._interpret_help_link
              else:
                  link = interpret_help_link
              # for now disable this help text everywhere except for Synapse because it
              # creates annoying scroll bars due to the additional height.
              # help = {"text": visualization._interpret_help_text, "link": link}
      elif isinstance(visualization, str):
          _type = "html"
          figure = _build_base64_frame_src(visualization)
      elif isinstance(visualization, cyto.Cytoscape):
          _type = "cytoscape"
          figure = _build_cytoscape_json(visualization)
      else:
          # NOTE: This error is largely specific to Dash components,
          #       all Dash component visualizations are being replaced with D3 soon.
          _type = "html"
          msg = "This visualization is not yet supported in the cloud environment."
          _log.debug(
              "Visualization type cannot render: {}".format(
                  type(visualization)
              )
          )
          figure = _build_error_frame(msg)
  
      return {"type": _type, "figure": figure, "help": help}
  
file_path: interpret/python/interpret-core/interpret/visual/_inline.py
imports: import os
  import time
  import uuid
  from plotly.io import to_json
  from plotly import graph_objs
  import sys
  import json
  import base64
  import logging
label_desc: Use image node_id 4 for calling a global function with example usage: _build_viz_figure(visualization, detected_envs) and returns: dict