docs: def sort_group(d, return_only_first=False):
      ''' Sort a dictionary of relative paths and cluster equal paths together at the same time '''
      # First, sort the paths in order (this must be a couple: (parent_dir, filename), so that there's no ambiguity because else a file at root will be considered as being after a folder/file since the ordering is done alphabetically without any notion of tree structure).
      d_sort = sort_dict_of_paths(d)
      # Pop the first item in the ordered list
      base_elt = (-1, None)
      while (base_elt[1] is None and d_sort):
          base_elt = d_sort.pop(0)
      # No element, then we just return
      if base_elt[1] is None:
          return None
      # Else, we will now group equivalent files together (remember we are working on multiple directories, so we can have multiple equivalent relative filepaths, but of course the absolute filepaths are different).
      else:
          # Init by creating the first group and pushing the first ordered filepath into the first group
          lst = []
          lst.append([base_elt])
          if d_sort:
              # For each subsequent filepath
              for elt in d_sort:
                  # If the filepath is not empty (generator died)
                  if elt[1] is not None:
                      # If the filepath is the same to the latest grouped filepath, we add it to the same group
                      if elt[1] == base_elt[1]:
                          lst[-1].append(elt)
                      # Else the filepath is different: we create a new group, add the filepath to this group, and replace the latest grouped filepath
                      else:
                          if return_only_first: break  # break here if we only need the first group
                          lst.append([elt])
                          base_elt = elt # replace the latest grouped filepath
          return lst