def try_get_polygon(map_data, lane_id):
        """
        This method tries to infer polygon from the boundaries
        """
        raise DeprecationWarning("This function can not infer the polygon still")
        lane_info = map_data[lane_id]
        center_line = lane_info["polyline"]
        left_boundary_points = []
        for boundary_info in lane_info[ScenarioDescription.LEFT_BOUNDARIES]:
            boundary = map_data[boundary_info["boundary_feature_id"]][ScenarioDescription.POLYLINE]
            start = center_line[int(boundary_info["lane_start_index"])]
            end = center_line[int(boundary_info["lane_end_index"])]

            start_on_boundary = nearest_point(start, boundary)
            end_on_boundary = nearest_point(end, boundary)

            points = boundary[start_on_boundary:end_on_boundary]
            left_boundary_points.append(points)

        left_boundary_points = np.concatenate(left_boundary_points, axis=0) if len(left_boundary_points) > 0 else []

        right_boundary_points = []
        for boundary_info in lane_info[ScenarioDescription.RIGHT_BOUNDARIES]:
            boundary = map_data[boundary_info["boundary_feature_id"]][ScenarioDescription.POLYLINE]
            start = center_line[int(boundary_info["lane_start_index"])]
            end = center_line[int(boundary_info["lane_end_index"])]

            start_on_boundary = nearest_point(start, boundary)
            end_on_boundary = nearest_point(end, boundary)

            points = boundary[start_on_boundary:end_on_boundary]
            right_boundary_points.append(points)

        right_boundary_points = np.concatenate(right_boundary_points, axis=0) if len(right_boundary_points) > 0 else []
        if len(left_boundary_points) == 0 or len(right_boundary_points) == 0:
            return None
        else:
            polygon = np.concatenate([left_boundary_points, right_boundary_points], axis=0)[..., :2]
            return np.asarray(polygon)

        This method tries to infer polygon from the boundaries
        
metadrive/component/lane/scenario_lane.py