def stage_information(self):
        """ Returns the amount of attached stages, and also the memory consumed
        in MiB in a tuple. """
        count, memory = 0, 0
        for entry in self.entries:
            if isinstance(entry, Texture):
                memory += entry.estimate_texture_memory()
                count += 1
            elif entry.__class__.__name__ == "RenderTarget":
                for target in itervalues(entry.targets):
                    memory += target.estimate_texture_memory()
                    count += 1
            else:
                self.warn("Unkown type:", entry.__class__.__name__)
        return memory, count
 Returns the amount of attached stages, and also the memory consumed
        in MiB in a tuple. 
metadrive/render_pipeline/rpcore/gui/buffer_viewer.py