code: def vertically_align_text_with_panels(
      text: Text, grid: GridSpecParams, va: str
  ):
      """
      Vertical justification
  
      Reinterpret vertical alignment to be justification about the panels.
      """
      if va == "center":
          text.set_y((grid.top + grid.bottom) / 2)
      elif va == "top":
          text.set_y(grid.top)
      elif va == "bottom":
          text.set_y(grid.bottom)
  
file_path: plotnine/plotnine/_mpl/_plotnine_tight_layout.py
imports: from __future__ import annotations
  import typing
  from copy import deepcopy
  from dataclasses import dataclass
  from matplotlib.offsetbox import AnchoredOffsetbox
  from ._plot_side_space import LRTBSpaces, WHSpaceParts, calculate_panel_spacing
label_desc: Use image node_id 4 for calling a global function with example usage: vertically_align_text_with_panels(text, grid, va) without return types