code: def advance(self, last_time):
          
          # advance the animation frame index, looping by default
          if self.index == len(self.frames) - 1:
              self.index = 0
          else:
              self.index += 1
  
          # set the timer for the next advance
          next_frame = self.frames[self.index]
          self.next = next_frame.duration + last_time
          return next_frame
docs: Advance the frame, and set timer for next frame
          
          Timer value is calculated by adding last_time and the
          duration of the next frame
          
          The next frame is returned
          
          This API may change in the future
          
          :param last_time: 
          :return: Animation Frame