def generate_polygon_from_horizontal_line(line_coords=None, thickness=None):
    """
    Generate a list of coordinate pairs that represent a polygon of given thickness around a line

    :param line_coords: list of coordinate pairs that represent a horizontal line.
    :param thickness: overall thickness of the resulting polygon.
    :returns: list of coordinate pairs that make up the resulting polygon
    :raises TypeError: none
    """
    if line_coords is not None and thickness is not None:
        # print(f"line_coords in generate_polygon_from_horizontal_line", line_coords)
        polygon_coords = []
        half_thickness = thickness // 2
        line_coords.sort(key=lambda x: x[0])
        rev_coords = line_coords[::-1]
        # print("reverse coordinates: ", rev_coords)
        for line_coord_pair in rev_coords:
            top_side = line_coord_pair[1]-half_thickness
            if top_side < 0:
                top_side = 0
            polygon_coords.append([line_coord_pair[0], top_side])
        for line_coord_pair in line_coords:
            bottom_side = line_coord_pair[1]+half_thickness
            polygon_coords.append([line_coord_pair[0], bottom_side])
        # print(polygon_coords)
        return polygon_coords
    else:
        return False