code: def ensure_dir(self, *path_parts):
          
          path = self.getpath(*path_parts)
          ensure_directory(path)
          return path
docs: Ensures a subdirectory of the working directory.
  
          Parameters
          ----------
          path_parts : iterable[str]
              The parts of the path after the working directory.