from typing import Tuple


def match_shape_lengths(s1: Tuple, s2: Tuple) -> Tuple:
    """
    Ensure s1 and s2 have the same count of axes with the largest count of axes
    as the desired size.  If s1 or s2 is shorter in axis count, add new axes of dimension 1 to the
    left of the shape.
    Returns the correctly sized two shapes. See twit_test.py

    This is used to get two tensor shapes able to be used by twit with the same number of axes each.
    """
    if len(s2) == 0:
        raise AttributeError("Tensor destination shape can not be length 0, nowhere to put the results!")
    while len(s1) < len(s2):
        s1 = (1,) + s1
    while len(s2) < len(s1):
        s2 = (1,) + s2
    return s1, s2