def METHOD_NAME(text_angle: Optional[float]) -> Optional[float]:
    """Adjust to (-180, 180]
    :param float or None text_angle: The text angle to be adjusted.
    :return: The adjusted text angle.
    :rtype: float
    """
    if text_angle is not None:
        if text_angle > 180.0:
            text_angle -= 360.0
    return text_angle