code: def _build_viz_obj(explanation, detected_envs):
      overall = _build_viz_figure(
          explanation.visualize(), detected_envs
      )
      if explanation.selector is None:
          # NOTE: Unsure if this should be a list or None in the long term.
          specific = []
          selector_obj = {"columns": [], "data": []}
      else:
          specific = [
              _build_viz_figure(explanation.visualize(i), detected_envs)
              for i in range(len(explanation.selector))
          ]
          selector_obj = {
              "columns": list(explanation.selector.columns),
              "data": explanation.selector.to_dict("records"),
          }
  
      viz_obj = {
          "name": explanation.name,
          "overall": overall,
          "specific": specific,
          "selector": selector_obj,
      }
      return viz_obj
  
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 6 for calling a global function with example usage: _build_viz_obj(explanation, detected_envs) and returns: viz_obj