def _clean_color(self, id):
        """
        Relinquish a color once the object is focibly destroyed
        SideEffect:
        BaseEngins.COLORS_OCCUPIED += 1
        BaseEngine.COLOR_PTR now points to the idx just released
        BaseEngine.COLORS_RECORED
        Mapping Destroyed

        """
        if id in self.id_c.keys():
            my_color = self.id_c.pop(id)
            if my_color in BaseEngine.COLORS_OCCUPIED:
                BaseEngine.COLORS_OCCUPIED.remove(my_color)
            BaseEngine.COLORS_FREE.add(my_color)
            # print("After cleaning:,", len(BaseEngine.COLORS_OCCUPIED), len(BaseEngine.COLORS_FREE))
            # if id in self.id_c.keys():
            #     self.id_c.pop(id)
            assert my_color in self.c_id.keys()
            self.c_id.pop(my_color)

        Relinquish a color once the object is focibly destroyed
        SideEffect:
        BaseEngins.COLORS_OCCUPIED += 1
        BaseEngine.COLOR_PTR now points to the idx just released
        BaseEngine.COLORS_RECORED
        Mapping Destroyed

        
metadrive/engine/base_engine.py