def dump_all_maps(self, file_name=None):
        """
        Dump all maps. If some maps are not generated, we will generate it at first
        """
        if file_name is None:
            start_seed = self.engine.global_config["start_seed"]
            end_seed = start_seed + self.engine.global_config["num_scenarios"]
            file_name = "{}_{}_{}.json".format(start_seed, end_seed, get_time_str())
        self.generate_all_maps()
        ret = {}
        for seed, map in tqdm(self.maps.items(), desc="Dump maps"):
            ret[seed] = map.get_meta_data()
        with open(file_name, "wb+") as file:
            pickle.dump(ret, file)
        return ret

        Dump all maps. If some maps are not generated, we will generate it at first
        
metadrive/manager/pg_map_manager.py