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","."]
code: def _log_batch(self, world):
      batch_act = world.get_acts()
      parleys = zip(*batch_act)
      for i, parley in enumerate(parleys):
          # in dynamic batching, we only return `batchsize` acts, but the
          # 'dyn_batch_idx' key in the task act corresponds the episode index
          # in the buffer
          idx = (
              parley[0]["dyn_batch_idx"]
              if "dyn_batch_idx" in parley[0]
              else i
          )
          self._add_msgs(parley, idx=idx)
          if self._check_episode_done(parley):
              self.reset_world(idx=idx)
  
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 10 for calling the WorldLogger obj's underlying member method code with example usage: obj._log_batch(world) without return types