code: def render_tfma_component(
      component_name: str,
      data: Union[
          List[Dict[str, Union[Dict[str, Any], str]]],
          Dict[str, List[Union[str, float, List[float]]]],
      ],
      config: Dict[str, Union[Dict[str, Dict[str, str]], str, bool]],
      trusted_html_for_vulcanized_tfma_js: str,
      event_handlers: Optional[PythonEventHandlersMap] = None,
  ) -> None:
      """Renders the specified TFMA component in Colab.
  
      Colab requires custom visualization to be rendered in a sandbox so we cannot
      use Jupyter widget.
  
      Args:
        component_name: The name of the TFMA web component to render.
        data: A dictionary containing data for visualization.
        config: A dictionary containing the configuration.
        trusted_html_for_vulcanized_tfma_js: Optional string of trusted HTML that is
          rendered unescaped.  This can be a script tag referencing a trusted
          external JS file or a script tag with trusted JS inline.
        event_handlers: Handlers for events on the js side.
      """
  
      html = generate_html_for_tfma_component(
          component_name,
          data,
          config,
          trusted_html_for_vulcanized_tfma_js,
          event_handlers,
      )
      display.display(display.HTML(html))
  
file_path: model-analysis/tensorflow_model_analysis/notebook/colab/util.py
imports: import base64
  import json
  from typing import Any, Callable, Dict, List, Optional, Union
  from google.colab import output
  from IPython import display
label_desc: Use image node_id 5 for calling a global function with example usage: render_tfma_component(component_name, data, config, trusted_html_for_vulcanized_tfma_js, event_handlers) without return types