def create_wave_lanes(
    pre_lane, lateral_dist: float, wave_length: float, last_straight_length: float, lane_width, toward_left=True
):
    """
    Prodeuce two lanes in adverse direction
    :param pre_lane: Previous abstract lane
    :param lateral_dist: the dist moved in previous lane's lateral direction
    :param wave_length: the length of two circular lanes in the previous lane's longitude direction
    :param following_lane_length: the length of last straight lane
    :return: List[Circular lane]
    """
    angle = np.pi - 2 * np.arctan(wave_length / (2 * lateral_dist))
    radius = wave_length / (2 * math.sin(angle))
    circular_lane_1, pre_lane = create_bend_straight(
        pre_lane, 10, radius, angle, False if toward_left else True, lane_width, [PGLineType.NONE, PGLineType.NONE]
    )
    pre_lane.reset_start_end(pre_lane.position(-10, 0), pre_lane.position(pre_lane.length - 10, 0))
    circular_lane_2, straight_lane = create_bend_straight(
        pre_lane, last_straight_length, radius, angle, True if toward_left else False, lane_width,
        [PGLineType.NONE, PGLineType.NONE]
    )
    return circular_lane_1, circular_lane_2, straight_lane

    Prodeuce two lanes in adverse direction
    :param pre_lane: Previous abstract lane
    :param lateral_dist: the dist moved in previous lane's lateral direction
    :param wave_length: the length of two circular lanes in the previous lane's longitude direction
    :param following_lane_length: the length of last straight lane
    :return: List[Circular lane]
    
metadrive/component/pgblock/create_pg_block_utils.py