def segment_interpolation_nearest(segment_a, segment_b, weight):
    """Interpolate 2 segments by taking the nearest one.

    Parameters
    ----------
    segment_a :
        First segment
    segment_b :
        Second segment
    weight :
        Interpolation weight

    Returns
    -------
    weldx.geometry.LineSegment
        Nearest segment

    """
    if weight > 0.5:
        return segment_b
    return segment_a