class_docstr: Logs actions/observations in a world and saves in a given format.
class_docstr_tok: ["Logs","actions\/observations","in","a","world","and","saves","in","a","given","format","."]
docstr: Log acts from a world.
docstr_tok: ["Log","acts","from","a","world","."]
code: def log(self, world):
      """
      Log acts from a world.
      """
      # log batch world
      if self._is_batch_world(world):
          self._log_batch(world)
          return
  
      # log single world
      acts = world.get_acts()
      self._add_msgs(acts)
      if world.episode_done():
          # add episode to logs and clear examples
          self.reset_world()
  
imports: from typing import Optional
  from parlai.core.params import ParlaiParser
  from parlai.core.opt import Opt
  from parlai.core.worlds import BatchWorld, DynamicBatchWorld
  from parlai.utils.misc import msg_to_str
  from parlai.utils.conversations import Conversations
  from parlai.utils.io import PathManager
  import parlai.utils.logging
  from parlai.core.message import Message
  import copy
  from tqdm import tqdm
label_desc: Use image node_id 11 for calling the WorldLogger obj's underlying member method code with example usage: obj.log(world) without return types