code: def joinpaths(self, *paths):
          
          if sys.version_info >= (3, 6):
              paths = [os.fspath(path) for path in paths]
          if len(paths) == 1:
              return paths[0]
          if self.is_windows_fs:
              return self._join_paths_with_drive_support(*paths)
          joined_path_segments = []
          sep = self._path_separator(paths[0])
          for path_segment in paths:
              if self._starts_with_root_path(path_segment):
                  # An absolute path
                  joined_path_segments = [path_segment]
              else:
                  if (joined_path_segments and
                          not joined_path_segments[-1].endswith(sep)):
                      joined_path_segments.append(sep)
                  if path_segment:
                      joined_path_segments.append(path_segment)
          return self._matching_string(paths[0], '').join(joined_path_segments)
docs: Mimic os.path.join using the specified path_separator.
  
          Args:
              *paths:  (str) Zero or more paths to join.
  
          Returns:
              (str) The paths joined by the path separator, starting with
              the last absolute path in paths.