code: def recommender_precision(
      predicted: List[list], actual: List[list]
  ) -> int:
      """
      Computes the precision of each user's list of recommendations, and averages precision over all users.
      ----------
      actual : a list of lists
          Actual items to be predicted
          example: [['A', 'B', 'X'], ['A', 'B', 'Y']]
      predicted : a list of lists
          Ordered predictions
          example: [['X', 'Y', 'Z'], ['X', 'Y', 'Z']]
      Returns:
      -------
          precision: int
      """
  
      precision = np.mean(
          list(
              map(
                  lambda x, y: np.round(_precision(x, y), 4),
                  predicted,
                  actual,
              )
          )
      )
      return precision
  
imports: import random
  from itertools import product
  from math import sqrt
  from typing import List
  import matplotlib.pyplot
  import numpy
  import pandas
  import scipy.sparse
  from sklearn.metrics import confusion_matrix, mean_squared_error
  from sklearn.metrics.pairwise import cosine_similarity
  import warnings
label_desc: Use image node_id 15 for calling a global function with example usage: recommender_precision(predicted, actual) and returns: precision