              j_min_score = i + 1
              for j in range(i + 1, len(img_list)):
                  f1encs = img_list[i][1]
                  f2encs = img_list[j][1]
                  if f1encs is not None and f2encs is not None and len(
                          f1encs) > 0 and len(f2encs) > 0:
                      score = face_recognition.face_distance(f1encs[0],
                                                             f2encs)[0]
                  else:
                      score = float("inf")
  
 
</s> remove             img_list[i + 1] = img_list[j_min_score]
            img_list[j_min_score] = img_list[i + 1]

 </s> add             (img_list[i + 1],
             img_list[j_min_score]) = (img_list[j_min_score],
                                       img_list[i + 1]) </s> remove             img_list[i + 1] = img_list[j_min_score]
            img_list[j_min_score] = img_list[i + 1]

 </s> add             (img_list[i + 1],
             img_list[j_min_score]) = (img_list[j_min_score],
                                       img_list[i + 1]) </s> remove             img_list[i + 1] = img_list[j_min_score]
            img_list[j_min_score] = img_list[i + 1]

 </s> add             (img_list[i + 1],
             img_list[j_min_score]) = (img_list[j_min_score],
                                       img_list[i + 1])
                if f1encs and f2encs:
              j_min_score = i + 1
              for j in range(i + 1, len(img_list)):
                  f1encs = img_list[i][1]
                  f2encs = img_list[j][1]
                if f1encs and f2encs:
                if f1encs and f2encs:
                      score = face_recognition.face_distance(f1encs[0],
                                                             f2encs)[0]
                  else:
                      score = float("inf")
  
keep keep keep keep replace replace keep keep keep keep keep
 Sort tool bugfixes and linting 
tools/sort.py