code: def sort_strokes(params, decision, scores):
      """
      sort_strokes
      """
      sorted_scores, sorted_index = paddle.sort(
          scores, axis=1, descending=False
      )
      sorted_params = []
      for idx in range(8):
          tmp_pick_params = paddle.gather(
              params[:, :, idx], axis=1, index=sorted_index
          )
          sorted_params.append(tmp_pick_params)
      sorted_params = paddle.stack(sorted_params, axis=2)
      sorted_decison = paddle.gather(
          decision.squeeze(2), axis=1, index=sorted_index
      )
      return sorted_params, sorted_decison
  
file_path: PaddleHub/modules/image/Image_gan/style_transfer/paint_transformer/render_serial.py
imports: import paddle
  import paddle.nn
  import paddle.nn.functional
  import numpy
  from PIL import Image
  import math
  import cv2
  import time
  from .render_utils import param2stroke, Dilation2d, Erosion2d
label_desc: Use image node_id 5 for calling a global function with example usage: sort_strokes(params, decision, scores) and returns: sorted_params,  sorted_decison