def coordinates_contain_point(coordinates, point):
    """
    This function uses `Crossing number method` (http:#geomalgorithms.com/a03-_inclusion.html) to check whether
    a polygon contains a point or not.
    For each segment with the coordinates `pt1` and `pt2`, we check to see if y coordinate of `point` is
    between y of `pt1` and `pt2`.
    If so, then we check to see if `point` is to the left of the edge; i.e. a line drawn from `point` to the right
    will intersect the edge. If the line intersects the polygon an odd number of times, it is inside.
    """

    contains = False
    j = - 1
    for i, pt1 in enumerate(coordinates):
        pt2 = coordinates[j]
        check_y = lambda: (pt1[1] <= point[1] < pt2[1]) or (pt2[1] <= point[1] < pt1[1])
        # The following checks if `point` is to the left of the current segment
        check_x = lambda: point[0] < (point[1] - pt1[1]) * (pt2[0] - pt1[0]) / (pt2[1] - pt1[1]) + pt1[0]

        if check_y() and check_x():
            contains = not contains
        j = i

    return contains