code: def _ensure_folders(self, *paths):
          
          for p in paths:
              # Only provide assurance for absolute paths.
              if not p or not os.path.isabs(p):
                  continue
              # See if what we're assuring is file- or folder-like.
              fpath, fname = os.path.split(p)
              base, ext = os.path.splitext(fname)
              # If there's no extension, ensure that we have the whole path.
              # Otherwise, just ensure that we have path to file's folder.
              self.make_dir(fpath if ext else p)
docs: Ensure that paths to folder(s) exist.
  
          Some command-line tools will not attempt to create folder(s) needed
          for output path to exist. They instead assume that they already are
          present and will fail if that assumption does not hold.
  
          :param Iterable[str] paths: Collection of path for which