docs: def pipeline_filepath(pm, filename=None, suffix=None):
      """
      Derive path to file for managed pipeline.
  
      :param pypiper.PipelineManager | pypiper.Pipeline pm: Manager of a
          particular pipeline instance.
      :param str filename: Name of file for which to create full path based
          on pipeline's output folder.
      :param str suffix: Suffix for the file; this can be added to the filename
          if provided or added to the pipeline name if there's no filename.
      :raises TypeError: If neither filename nor suffix is provided, raise a
          TypeError, as in that case there's no substance from which to create
          a filepath.
      :return str: Path to file within managed pipeline's output folder, with
          filename as given or determined by the pipeline name, and suffix
          appended if given.
      """
  
      if filename is None and suffix is None:
          raise TypeError("Provide filename and/or suffix to create "
                          "path to a pipeline file.")
  
      filename = (filename or pm.name) + (suffix or "")
  
      # Note that Pipeline and PipelineManager define the same outfolder.
      # In fact, a Pipeline just references its manager's outfolder.
      # So we can handle argument of either type to pm parameter.
      return filename if os.path.isabs(filename) \
          else os.path.join(pm.outfolder, filename)