def shared_length(a, *args) -> int:
    """
    Returns the shared length between arguments if the length identical.
    >>> shared_length([1,1,1], [2,2,2], [3,3,3])
    3
    >>> shared_length(np.array([1]), np.array([2]))
    1
    >>> shared_length((1, 1), [2, 2])
    2
    >>> shared_length((1, 1), (2, 2))
    2
    >>> shared_length((1, 2), (1, 2, 3))
    Traceback (most recent call last):
    Exception: lengths of (1, 2) and (1, 2, 3) differ: 2 != 3
    """
    na = len(a)
    for arg in args:
        nb = len(arg)
        if na != nb:
            raise Exception(f"lengths of {a} and {arg} differ: {na} != {nb}")

    return na