def MigrateForward(self, client, message, callback):
    def _ReplaceEventWithEpisode(key, value):
      if RenameEventMigrator._EPISODE_TO_EVENT.has_key(key):
        raise BadMessageException('Episode fields should not appear in older messages.')
      episode = RenameEventMigrator._EVENT_TO_EPISODE.get(key, None)
      return (episode, value) if episode else None

    message.Visit(_ReplaceEventWithEpisode)
    callback()
Visit all fields in the message and replace event fields with episode fields.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/base/message.py/RenameEventMigrator.MigrateForward