code: def outfiles(markov, fmt, nfiles, progress, start=0):
      
      pbar = None
      channels = markov.imgtype.channels
  
      tr = markov.scanner.traversal
      if progress and not isinstance(tr[0], TraversalProgressWrapper):
          tr[0] = TraversalProgressWrapper(tr[0], channels)
      tr = tr[0]
  
      try:
          with _outfiles(fmt, nfiles, progress) as fnames:
              for fname in fnames:
                  if progress:
                      title = truncate(fname, BAR_DESC_SIZE - 1, False)
                      pbar = tqdm(
                          initial=start * len(channels),
                          total=markov.levels * len(channels),
                          desc=title, leave=False, unit='lvl',
                          bar_format=BAR_FORMAT, dynamic_ncols=True
                      )
                      tr.pbar_parent = pbar
                  yield fname
                  if progress:
                      pbar.close()
                      pbar = None
      finally:
          if pbar is not None:
              pbar.close()
docs: Get output file paths.
  
      Parameters
      ----------
      markov : `markovchain.base.MarkovBase`
          Markov chain generator.
      fmt : `str`
          File path format string.
      nfiles : `int`
          Number of files.
      progress : `bool`
          Show progress bars.
      start : `int`, optional
          Initial image level (default: 0).
  
      Returns
      -------
      `generator` of `str`
          Output file paths.