code: def recall_at_k_insQA(y_true, y_pred, k):
      labels = np.repeat(
          np.expand_dims(np.asarray(y_true), axis=1), k, axis=1
      )
      predictions = np.array(y_pred)
      predictions = np.flip(np.argsort(predictions, -1), -1)[:, :k]
      flags = np.zeros_like(predictions)
      for i in range(predictions.shape[0]):
          for j in range(predictions.shape[1]):
              if predictions[i][j] in np.arange(labels[i][j]):
                  flags[i][j] = 1.0
      return np.mean((np.sum(flags, -1) >= 1.0).astype(float))
  
imports: import numpy
  from deeppavlov.core.common.metrics_registry import register_metric
label_desc: Use image node_id 3 for calling a global function with example usage: recall_at_k_insQA(y_true, y_pred, k) and returns: np