code: def rank_predictions(tf_prediction):
      """
      Double-sortation serves as a ranking process
      The +1 is so the top-ranked has a non-zero rank
      :param tf_prediction:
      :return:
      """
      tf_prediction_item_size = tf.shape(tf_prediction)[1]
      tf_indices_of_ranks = tf.nn.top_k(
          tf_prediction, k=tf_prediction_item_size
      )[1]
      return (
          tf.nn.top_k(-tf_indices_of_ranks, k=tf_prediction_item_size)[
              1
          ]
          + 1
      )
  
file_path: tensorrec/tensorrec/recommendation_graphs.py
imports: import tensorflow
label_desc: Use image node_id 6 for calling a global function with example usage: rank_predictions(tf_prediction) and returns: unknown