code: def _precision(predicted, actual):
      prec = [value for value in predicted if value in actual]
      prec = float(len(prec)) / float(len(predicted))
      return prec
  
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 14 for calling a global function with example usage: _precision(predicted, actual) and returns: prec