def __init__(self, slide, machine, animation, width=None, height=None,
                 start_frame=0, fps=10, repeat=False, drop_frames=True,
                 play_now=True, x=None, y=None, h_pos=None,
                 v_pos=None, layer=0, **kwargs):

        super(AnimationDisplayElement, self).__init__(slide, x, y, h_pos, v_pos,
                                                      layer)

        self.loadable_asset = True
        self.machine = machine

        if machine.animations not in animation:
            raise Exception("Received a request to add an animation, but "
                            "the name registered animations.")
        else:
            self.animation = machine.animations[animation]

        self.current_frame = start_frame
        self.fps = 0
        self.repeat = repeat
        self.drop_frames = drop_frames
        self.playing = False
        self.secs_per_frame = 0
        self.next_frame_time = 0
        self.last_frame_time = 0
        self.set_fps(fps)
        self.layer = layer

        if self.animation.loaded:
            self._asset_loaded()
        else:
            self.ready = False
            self.animation.load(callback=self._asset_loaded)

        if play_now:
            self.play()
        # todo need to make it so that play() won't start until this all the
        # elements in this slide are ready to go
dataset/ETHPy150Open missionpinball/mpf/mpf/media_controller/elements/animation.py/AnimationDisplayElement.__init__/swapped operands of `not in`