docs: def _output_path(self, input_path, to_format, archive=False):
          """Construct an output path string from an input path string.
          :param str input_path: Input path string.
          :return: Output path string.
          :rtype: :py:class:`str`
          """
          indirpath, fname = os.path.split(os.path.abspath(os.path.normpath(input_path)))
  
          commonprefix = os.path.commonprefix([os.path.abspath(self.file_generator.from_path),
                                               os.path.abspath(indirpath)])
  
          commonparts = commonprefix.split(os.sep)
          inparts = indirpath.split(os.sep)
          outparts = inparts[len(commonparts):]
  
          if archive:
              outdirpath = os.path.join(*outparts) if outparts else ""
          else:
              outdirpath = os.path.join(self.file_generator.to_path, *outparts)
  
          return os.path.join(outdirpath, fname + self.file_generator.file_extension[to_format])