def _check_map_features(cls, map_feature):
        """Check if all lanes in the map contain the polyline (center line) feature and if they are in correct types."""
        for id, feature in map_feature.items():
            if MetaDriveType.is_lane(feature[ScenarioDescription.TYPE]):
                assert ScenarioDescription.POLYLINE in feature, "No lane center line in map feature"
                assert isinstance(
                    feature[ScenarioDescription.POLYLINE], (np.ndarray, list, tuple)
                ), "lane center line is in invalid type"
            if ScenarioDescription.POLYGON in feature and ScenarioDescription.POLYLINE in feature:
                line_centroid = np.mean(feature["polyline"], axis=0)[:2]
                polygon_centroid = np.mean(feature["polygon"], axis=0)[:2]
                diff = line_centroid - polygon_centroid
                assert norm(diff[0], diff[
                    1]) < 100, "The distance between centroids of polyline and polygon is greater than 100m. " \
                               "The map converter should be wrong!"
Check if all lanes in the map contain the polyline (center line) feature and if they are in correct types.
metadrive/scenario/scenario_description.py