def CreateAdverseRoad(
    positive_road: "Road",
    roadnet_to_get_road: "NodeRoadNetwork",  # mostly, block network
    roadnet_to_check_cross: "NodeRoadNetwork",  # mostly, previous global network
    ignore_start: str = None,
    ignore_end: str = None,
    center_line_type=None,
    side_lane_line_type=None,
    inner_lane_line_type=None,
    center_line_color=None,
    ignore_intersection_checking=None,
    metadrive_lane_type=None
) -> bool:
    """
    Create the adverse road given the road network.

    Args:
        positive_road:
        roadnet_to_get_road: The block network
        roadnet_to_check_cross: The existing global network
        ignore_start:
        ignore_end:
        center_line_type:
        side_lane_line_type:
        inner_lane_line_type:
        center_line_color:
        ignore_intersection_checking:
        metadrive_lane_type:

    Returns:
        A Boolean indicator saying whether the road is constructed successfully.
    """
    center_line_type = center_line_type or PGLineType.CONTINUOUS  # Identical to Block.CENTER_LINE_TYPE
    side_lane_line_type = side_lane_line_type or PGLineType.SIDE
    inner_lane_line_type = inner_lane_line_type or PGLineType.BROKEN
    center_line_color = center_line_color or PGLineColor.YELLOW

    adverse_road = -positive_road
    lanes = get_lanes_on_road(positive_road, roadnet_to_get_road)
    reference_lane = lanes[-1]
    num = len(lanes) * 2
    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,
        int(num / 2),
        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,
        center_line_color=center_line_color,
        ignore_intersection_checking=ignore_intersection_checking,
        metadrive_lane_type=metadrive_lane_type
    )
    positive_road.get_lanes(roadnet_to_get_road)[0].line_colors = [center_line_color, PGLineColor.GREY]
    return success

    Create the adverse road given the road network.

    Args:
        positive_road:
        roadnet_to_get_road: The block network
        roadnet_to_check_cross: The existing global network
        ignore_start:
        ignore_end:
        center_line_type:
        side_lane_line_type:
        inner_lane_line_type:
        center_line_color:
        ignore_intersection_checking:
        metadrive_lane_type:

    Returns:
        A Boolean indicator saying whether the road is constructed successfully.
    
metadrive/component/pgblock/create_pg_block_utils.py