code: def rank_response(y_true, y_pred):
      num_examples = float(len(y_pred))
      predictions = np.array(y_pred)
      predictions = np.flip(np.argsort(predictions, -1), -1)
      rank_tot = 0
      for el in predictions:
          for i, x in enumerate(el):
              if x == 0:
                  rank_tot += i
                  break
      return float(rank_tot) / num_examples
  
imports: import numpy
  from deeppavlov.core.common.metrics_registry import register_metric
label_desc: Use image node_id 1 for calling a global function with example usage: rank_response(y_true, y_pred) and returns: unknown