code: def format_runlog(runlog: List[Mapping[str, Any]]) -> str:
      
      to_ret = []
      for command in runlog:
          to_ret.append(
              '\t' * command['level']
              + command['payload'].get('text', '').format(**command['payload']))
          if command['logs']:
              to_ret.append('\t' * command['level'] + 'Logs from this command:')
              to_ret.extend(
                  ['\t' * command['level']
                   + f'{l.levelname} ({l.module}): {l.msg}' % l.args
                   for l in command['logs']])
      return '\n'.join(to_ret)
docs: Format a run log (return value of :py:meth:`simulate``) into a
      human-readable string
  
      :param runlog: The output of a call to :py:func:`simulate`