code: def vegalite(spec: dict, validate: bool = True) -> None:
      """Render and optionally validate a VegaLite 5 spec.
  
      This will use the currently enabled renderer to render the spec.
  
      Parameters
      ==========
      spec: dict
          A fully compliant VegaLite 5 spec, with the data portion fully processed.
      validate: bool
          Should the spec be validated against the VegaLite 5 schema?
      """
      from IPython.display import display
  
      display(VegaLite(spec, validate=validate))
  
file_path: altair/altair/vegalite/v5/display.py
imports: import os
  from typing import Dict
  from ...utils.mimebundle import spec_to_mimebundle
  from ..display import Displayable, default_renderer_base, json_renderer_base, RendererRegistry, HTMLRenderer, DefaultRendererReturnType
  from .schema import SCHEMA_VERSION
  from typing import Final
label_desc: Use image node_id 6 for calling a global function with example usage: vegalite(spec, validate) without return types