code: def process_animation_queue(self, tile_view):
          
  
          # verify that there are tile substitutions ready
          self._update_time()
          try:
              if self._animation_queue[0].next > self._last_time:
                  return
  
          # raised with the animation queue is empty (no animations at all)
          except IndexError:
              return
  
          new_tiles = list()
          new_tiles_append = new_tiles.append
          tile_layers = tuple(self.visible_tile_layers)
          get_tile_image = self.get_tile_image
  
          # test if the next scheduled tile change is ready
          while self._animation_queue[0].next <= self._last_time:
  
              # get the next tile/frame which is ready to be changed
              token = heappop(self._animation_queue)
              next_frame = token.advance(self._last_time)
              heappush(self._animation_queue, token)
  
              # following line for when all gid positions are known
              # for position in self._tracked_tiles & token.positions:
  
              for position in token.positions.copy():
                  x, y, l = position
  
                  # if this tile is on the buffer (checked by using the tile view)
                  if tile_view.collidepoint(x, y):
  
                      # record the location of this tile, in case of a screen wipe, or sprite cover
                      self._animated_tile[position] = next_frame.image
  
                      # redraw the entire column of tiles
                      for layer in tile_layers:
                          if layer == l:
  
                              # queue the new animated tile
                              new_tiles_append((x, y, layer, next_frame.image))
                          else:
  
                              # queue the normal tile
                              image = get_tile_image(x, y, layer)
                              if image:
                                  new_tiles_append((x, y, layer, image))
  
                  # not on screen, but was previously.  clear it.
                  else:
                      token.positions.remove(position)
  
          return new_tiles
docs: Given the time and the tile view, process tile changes and return them
          
          :param tile_view: rect representing tiles on the screen
          :type tile_view: pygame.Rect
          
          :rtype: list