code: def text_to_text(shap_values):
      # unique ID added to HTML elements and function to avoid collision of different instances
      uuid = "".join(random.choices(string.ascii_lowercase, k=20))
  
      saliency_plot_markup = saliency_plot(shap_values)
      heatmap_markup = heatmap(shap_values)
  
      html = f"""
      <html>
      <div id="{uuid}_viz_container">
        <div id="{uuid}_viz_header" style="padding:15px;border-style:solid;margin:5px;font-family:sans-serif;font-weight:bold;">
          Visualization Type:
          <select name="viz_type" id="{uuid}_viz_type" onchange="selectVizType_{uuid}(this)">
            <option value="heatmap" selected="selected">Input/Output - Heatmap</option>
            <option value="saliency-plot">Saliency Plot</option>
          </select>
        </div>
        <div id="{uuid}_content" style="padding:15px;border-style:solid;margin:5px;">
            <div id = "{uuid}_saliency_plot_container" class="{uuid}_viz_container" style="display:none">
                {saliency_plot_markup}
            </div>
  
            <div id = "{uuid}_heatmap_container" class="{uuid}_viz_container">
                {heatmap_markup}
            </div>
        </div>
      </div>
      </html>
      """
  
      javascript = f"""
      <script>
          function selectVizType_{uuid}(selectObject) {{
  
            /* Hide all viz */
  
              var elements = document.getElementsByClassName("{uuid}_viz_container")
            for (var i = 0; i < elements.length; i++){{
                elements[i].style.display = 'none';
            }}
  
            var value = selectObject.value;
            if ( value === "saliency-plot" ){{
                document.getElementById('{uuid}_saliency_plot_container').style.display  = "block";
            }}
            else if ( value === "heatmap" ) {{
                document.getElementById('{uuid}_heatmap_container').style.display  = "block";
            }}
          }}
      </script>
      """
  
      _ipython_display_html(javascript + html)
  
file_path: shap/shap/plots/_text.py
imports: import json
  import random
  import string
  import numpy
  from .None import colors
label_desc: Use image node_id 5 for calling a global function with example usage: text_to_text(shap_values) without return types