def boundaries_to_knots(boundaries, degree):
    """Construct the knot sequences used at the boundaries of a B-spline.

    # Arguments

    boundaries : A tuple containing two floats (low, high).
    degree     : The degree of the B-spline pieces.

    # Returns

    A 2-tuple containing the lower and upper knot sequences as lists.

    """
    d = int(degree)
    lo, hi = boundaries
    return d * [lo], d * [hi]