def add(self, scene):
if not isinstance(scene, Scene):<EOL><INDENT>raise TypeError()<EOL><DEDENT>for i, j in enumerate(self.__scenes):<EOL><INDENT>if j.scene_id == scene.scene_id:<EOL><INDENT>self.__scenes[i] = scene<EOL>return<EOL><DEDENT><DEDENT>self.__scenes.append(scene)<EOL>
Add scene, replace existing scene if scene with scene_id is present.