code: def recall_at_k(
      rating_true,
      rating_pred,
      col_user=DEFAULT_USER_COL,
      col_item=DEFAULT_ITEM_COL,
      col_prediction=DEFAULT_PREDICTION_COL,
      relevancy_method="top_k",
      k=DEFAULT_K,
      threshold=DEFAULT_THRESHOLD,
      **_,
  ):
      """Recall at K.
  
      Args:
          rating_true (pandas.DataFrame): True DataFrame
          rating_pred (pandas.DataFrame): Predicted DataFrame
          col_user (str): column name for user
          col_item (str): column name for item
          col_prediction (str): column name for prediction
          relevancy_method (str): method for determining relevancy ['top_k', 'by_threshold', None]. None means that the
              top k items are directly provided, so there is no need to compute the relevancy operation.
          k (int): number of top k items per user
          threshold (float): threshold of top items per user (optional)
  
      Returns:
          float: recall at k (min=0, max=1). The maximum value is 1 even when fewer than
          k items exist for a user in rating_true.
      """
      df_hit, df_hit_count, n_users = merge_ranking_true_pred(
          rating_true=rating_true,
          rating_pred=rating_pred,
          col_user=col_user,
          col_item=col_item,
          col_prediction=col_prediction,
          relevancy_method=relevancy_method,
          k=k,
          threshold=threshold,
      )
  
      if df_hit.shape[0] == 0:
          return 0.0
  
      return (
          df_hit_count["hit"] / df_hit_count["actual"]
      ).sum() / n_users
  
imports: import numpy
  import pandas
  from functools import wraps
  from sklearn.metrics import mean_squared_error, mean_absolute_error, r2_score, explained_variance_score, roc_auc_score, log_loss
  from recommenders.utils.constants import DEFAULT_USER_COL, DEFAULT_ITEM_COL, DEFAULT_RATING_COL, DEFAULT_PREDICTION_COL, DEFAULT_RELEVANCE_COL, DEFAULT_SIMILARITY_COL, DEFAULT_ITEM_FEATURES_COL, DEFAULT_ITEM_SIM_MEASURE, DEFAULT_K, DEFAULT_THRESHOLD
  from recommenders.datasets.pandas_df_utils import has_columns, has_same_base_dtype, lru_cache_df
label_desc: Use image node_id 11 for calling a global function with example usage: recall_at_k(rating_true, rating_pred, col_user, col_item, col_prediction, relevancy_method, k, threshold) and returns: unknown, int