def __init__(self, map_config: dict = None, random_seed=None):
        """
        Map can be stored and recover to save time when we access the map encountered before
        """
        assert random_seed is None
        # assert random_seed == map_config[
        #     self.SEED
        # ], "Global seed {} should equal to seed in map config {}".format(random_seed, map_config[self.SEED])
        super(BaseMap, self).__init__(config=map_config)

        # map features
        self.road_network = self.road_network_type()
        self.crosswalks = {}
        self.sidewalks = {}

        # A flatten representation of blocks, might cause chaos in city-level generation.
        self.blocks = []

        # Generate map and insert blocks
        # self.engine = get_engine()
        self._generate()
        assert self.blocks, "The generate methods does not fill blocks!"

        # lanes debug
        self.lane_coordinates_debug_node = None
        if self.engine.global_config["show_coordinates"]:
            self.show_coordinates()

        #  a trick to optimize performance
        self.spawn_roads = None
        self.detach_from_world()

        # save a backup
        # self._semantic_map = None
        # self._height_map = None

        Map can be stored and recover to save time when we access the map encountered before
        
metadrive/component/map/base_map.py