def init_stages(self):
        """ Inits all required stages for the lighting """

        add_stage = self.pipeline.stage_mgr.add_stage

        self.flag_cells_stage = FlagUsedCellsStage(self.pipeline)
        add_stage(self.flag_cells_stage)

        self.collect_cells_stage = CollectUsedCellsStage(self.pipeline)
        add_stage(self.collect_cells_stage)

        self.cull_lights_stage = CullLightsStage(self.pipeline)
        add_stage(self.cull_lights_stage)

        self.apply_lights_stage = ApplyLightsStage(self.pipeline)
        add_stage(self.apply_lights_stage)

        self.shadow_stage = ShadowStage(self.pipeline)
        self.shadow_stage.size = self.shadow_manager.get_atlas_size()
        add_stage(self.shadow_stage)
 Inits all required stages for the lighting 
metadrive/render_pipeline/rpcore/light_manager.py