                  input_image_bgr=cv2.imread(x),
                  detector='dlib-cnn',
                  verbose=True,
                  input_is_predetected_face=True).landmarks
              img_list.append([x,
                               self.calc_landmarks_face_yaw(np.array(d[0][1]))])
  
          print("Sorting by face-yaw...")
          img_list = sorted(img_list, key=operator.itemgetter(1), reverse=True)
  
          return img_list
 
</s> remove         for x in tqdm(self.find_images(input_dir),
                      desc="Loading",
                      file=sys.stdout):
            d = face_alignment.Extract(
                input_image_bgr=cv2.imread(x),
 </s> add         for img in tqdm(self.find_images(input_dir),
                        desc="Loading",
                        file=sys.stdout):
            landmarks = face_alignment.Extract(
                input_image_bgr=cv2.imread(img), </s> remove 
 </s> add         """ Sort by dlib CNN similarity """ </s> remove         for x in tqdm(self.find_images(input_dir),
                      desc="Loading",
                      file=sys.stdout):
            d = face_alignment.Extract(
                input_image_bgr=cv2.imread(x),
 </s> add         for img in tqdm(self.find_images(input_dir),
                        desc="Loading",
                        file=sys.stdout):
            landmarks = face_alignment.Extract(
                input_image_bgr=cv2.imread(img), </s> remove         for x in tqdm(self.find_images(input_dir),
                      desc="Loading",
                      file=sys.stdout):
            d = face_alignment.Extract(
                input_image_bgr=cv2.imread(x),
 </s> add         for img in tqdm(self.find_images(input_dir),
                        desc="Loading",
                        file=sys.stdout):
            landmarks = face_alignment.Extract(
                input_image_bgr=cv2.imread(img), </s> remove             img_list.append([x, np.array(d[0][1])
                             if len(d) > 0
 </s> add             img_list.append([img, np.array(landmarks[0][1])
                             if landmarks
            img_list.append(
                [img, self.calc_landmarks_face_yaw(np.array(landmarks[0][1]))])
                  input_image_bgr=cv2.imread(x),
                  detector='dlib-cnn',
                  verbose=True,
                  input_is_predetected_face=True).landmarks
            img_list.append(
                [img, self.calc_landmarks_face_yaw(np.array(landmarks[0][1]))])
            img_list.append(
                [img, self.calc_landmarks_face_yaw(np.array(landmarks[0][1]))])
  
          print("Sorting by face-yaw...")
          img_list = sorted(img_list, key=operator.itemgetter(1), reverse=True)
  
          return img_list
keep keep keep keep replace replace keep keep keep keep keep
 Sort tool bugfixes and linting 
tools/sort.py