<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tangent_bbox_intersection(first, second, intersections):
 r"""Check if two curves with tangent bounding boxes intersect. .. note:: This is a helper for :func:`intersect_one_round`. These functions are used (directly or indirectly) by :func:`_all_intersections` exclusively, and that function has a Fortran equivalent. If the bounding boxes are tangent, intersection can only occur along that tangency. If the curve is **not** a line, the **only** way the curve can touch the bounding box is at the endpoints. To see this, consider the component .. math:: x(s) = \sum_j W_j x_j. Since :math:`W_j > 0` for :math:`s \in \left(0, 1\right)`, if there is some :math:`k` with :math:`x_k < M = \max x_j`, then for any interior :math:`s` .. math:: x(s) < \sum_j W_j M = M. If all :math:`x_j = M`, then :math:`B(s)` falls on the line :math:`x = M`. (A similar argument holds for the other three component-extrema types.) .. note:: This function assumes callers will not pass curves that can be linearized / are linear. In :func:`_all_intersections`, curves are pre-processed to do any linearization before the subdivision / intersection process begins. Args: first (SubdividedCurve):
 First curve being intersected (assumed in :math:\mathbf{R}^2`). second (SubdividedCurve):
 Second curve being intersected (assumed in :math:\mathbf{R}^2`). intersections (list):
 A list of already encountered intersections. If these curves intersect at their tangency, then those intersections will be added to this list. """

    node_first1 = first.nodes[:, 0]
    node_first2 = first.nodes[:, -1]
    node_second1 = second.nodes[:, 0]
    node_second2 = second.nodes[:, -1]
    endpoint_check(
        first, node_first1, 0.0, second, node_second1, 0.0, intersections
    )
    endpoint_check(
        first, node_first1, 0.0, second, node_second2, 1.0, intersections
    )
    endpoint_check(
        first, node_first2, 1.0, second, node_second1, 0.0, intersections
    )
    endpoint_check(
        first, node_first2, 1.0, second, node_second2, 1.0, intersections
    )