              y_center = int(np.rint(np.average(y_indices) + h)
              x_center = int(np.rint(np.average(x_indices) + w)
              '''
  
              insertion = np.rint(masked[y_crop, x_crop, :]).astype('uint8')
              insertion_mask = image_mask[y_crop, x_crop, :]
              insertion_mask[insertion_mask != 0] = 255
              insertion_mask = insertion_mask.astype('uint8')
  
              prior = np.pad(frame, ((h, h), (w, w), (0, 0)), 'constant').astype('uint8')
 
</s> remove                                 (15, 15),
                                10)
        new_face[crop, crop] = (mask / 255 * new_face +
                                (1 - mask / 255) * old_face)
 </s> add                                 (window, window),
                                sigma)
        new_face[crop, crop] = (mask * new_face + (1.0 - mask ) * old_face) </s> remove         mask[height // 15:-height // 15, width // 15:-width // 15, :] = 255
 </s> add         mask[erode, erode] = 1.0 </s> remove                 blur = cv2.GaussianBlur(masked, (0, 0), 3.0)  # pylint: disable=no-member
                masked = cv2.addWeighted(masked,  # pylint: disable=no-member
 </s> add                 blur = cv2.GaussianBlur(new_image, (0, 0), 3.0)  # pylint: disable=no-member
                new_image = cv2.addWeighted(new_image,  # pylint: disable=no-member </s> remove             blended = blended[h:-h, w:-w, :]
 </s> add             blended = blended[h:-h, w:-w] </s> remove             foreground = masked * image_mask
 </s> add             foreground = new_image * image_mask
            insertion = np.rint(new_image[y_crop, x_crop, :]).astype('uint8')
              y_center = int(np.rint(np.average(y_indices) + h)
              x_center = int(np.rint(np.average(x_indices) + w)
              '''
  
            insertion = np.rint(new_image[y_crop, x_crop, :]).astype('uint8')
              insertion_mask = image_mask[y_crop, x_crop, :]
              insertion_mask[insertion_mask != 0] = 255
              insertion_mask = insertion_mask.astype('uint8')
  
              prior = np.pad(frame, ((h, h), (w, w), (0, 0)), 'constant').astype('uint8')
keep keep keep keep replace keep keep keep keep keep
 auto smooth edges size and clarify naming 
plugins/convert/masked.py