def boundary_substraction(
    *,
    boundary: tuple[tuple[int, ...], ...],
    subtracted: tuple[tuple[int, ...], ...],
) -> tuple[tuple[int, ...], ...]:
    """From a boundary composed of tuples of node number segments, subtracts the subset
    of those segments contained in the subtracted tuple.

    Arguments:
        boundary (tuple[tuple[int, ...], ...]):  A tuple of tuples of ints, where each
            integer is a node number in sequence along a discrete boundary.
        subtracted (tuple[tuple[int, ...], ...]):  A subset of the boundary.

    Returns:
        tuple[tuple[int, ...], ...]: The difference of boundary less subtracted.
    """
    output = tuple(
        boundary_i for boundary_i in boundary if boundary_i not in subtracted
    )
    return output