def CreateTwoWayRoad(
    road_to_change: "Road",
    roadnet_to_get_road: "NodeRoadNetwork",  # mostly, block network
    roadnet_to_check_cross: "NodeRoadNetwork",  # mostly, previous global network
    new_road_name: Road = None,
    ignore_start: str = None,
    ignore_end: str = None,
    center_line_type=PGLineType.CONTINUOUS,  # Identical to Block.CENTER_LINE_TYPE
    side_lane_line_type=PGLineType.SIDE,
    inner_lane_line_type=PGLineType.BROKEN,
    ignore_intersection_checking=None
) -> bool:
    """
    This function will add a new road in reverse direction to the road network
    Then the road will change from:
    ---------->
    ---------->
    to:
    <--------->
    <--------->
    As a result, vehicles can drive in both direction
    :return: cross or not
    """
    adverse_road = Road(road_to_change.end_node, road_to_change.start_node) if new_road_name is None else new_road_name
    lanes = get_lanes_on_road(road_to_change, roadnet_to_get_road)
    reference_lane = lanes[-1]
    num = len(lanes)
    width = reference_lane.width_at(0)
    if isinstance(reference_lane, StraightLane):
        start_point = reference_lane.position(lanes[-1].length, -(num - 1) * width)
        end_point = reference_lane.position(0, -(num - 1) * width)
        symmetric_lane = StraightLane(
            start_point, end_point, width, lanes[-1].line_types, reference_lane.forbidden, reference_lane.speed_limit,
            reference_lane.priority
        )
    elif isinstance(reference_lane, CircularLane):
        start_phase = reference_lane.end_phase
        angle = reference_lane.angle
        new_lane_clockwise = False if reference_lane.is_clockwise() else True
        if not new_lane_clockwise:
            radius = reference_lane.radius + (num - 1) * width
        else:
            radius = reference_lane.radius - (num - 1) * width
        symmetric_lane = CircularLane(
            reference_lane.center, radius, start_phase, angle, new_lane_clockwise, width, reference_lane.line_types,
            reference_lane.forbidden, reference_lane.speed_limit, reference_lane.priority
        )
    else:
        raise ValueError("Creating other lanes is not supported")
    success = CreateRoadFrom(
        symmetric_lane,
        num,
        adverse_road,
        roadnet_to_get_road,
        roadnet_to_check_cross,
        ignore_start=ignore_start,
        ignore_end=ignore_end,
        side_lane_line_type=side_lane_line_type,
        inner_lane_line_type=inner_lane_line_type,
        center_line_type=center_line_type,
        ignore_intersection_checking=ignore_intersection_checking
    )
    return success

    This function will add a new road in reverse direction to the road network
    Then the road will change from:
    ---------->
    ---------->
    to:
    <--------->
    <--------->
    As a result, vehicles can drive in both direction
    :return: cross or not
    
metadrive/component/pgblock/create_pg_block_utils.py