def METHOD_NAME(
    text: Text, grid: GridSpecParams, ha: str
):
    """
    Horizontal justification
    Reinterpret horizontal alignment to be justification about the panels.
    """
    if ha == "center":
        text.set_x((grid.left + grid.right) / 2)
    elif ha == "left":
        text.set_x(grid.left)
    elif ha == "right":
        text.set_x(grid.right)