def triangle_tangent(triangle):
    """
    Takes section of curve defined by 3 points, finds tangent to the second point
    (This tangent is defined by its 2 points - triangle[1] and triangle[2]')

    Input: triangle [[xy], [xy], [xy]]
    Output: tangent [[xy], [xy]]
    """
    assert len(triangle) == 3, "Input must be 3 points (finding tangent impossible). ~ abstract_geometry.offset_bezier[triangle_tangent()]"
    triangle = [xy.copy() for xy in triangle]  # make a copy of input list to protect it (prevent state change)
    (ac_line, cb_line) = (triangle[:2], triangle[1:])
    ac_x_shift = ac_line[1][0] - ac_line[0][0]
    ac_y_shift = ac_line[1][1] - ac_line[0][1]
    tangent = [
        triangle[1],
        [triangle[2][0] + ac_x_shift, triangle[2][1] + ac_y_shift]
    ]
    return tangent