code: def __posix_to_local_path(path, local_path_module=os.path):
      
      partial_path = deque()
      while True:
          if not path or path == '/':
              break
          (path, base) = posixpath.split(path)
          partial_path.appendleft(base)
      return local_path_module.join(*partial_path)
docs: Converts a posix path (coming from Galaxy), to a local path (be it posix or Windows).
  
      >>> import ntpath
      >>> __posix_to_local_path('dataset_1_files/moo/cow', local_path_module=ntpath)
      'dataset_1_files\\\\moo\\\\cow'
      >>> import posixpath
      >>> __posix_to_local_path('dataset_1_files/moo/cow', local_path_module=posixpath)
      'dataset_1_files/moo/cow'