def METHOD_NAME(instances, predictions):
  """Prints top k titles predicted for each user.
  Args:
    instances: predication inputs.
    predictions: a list of prediction dicts returned by the model.
  """
  for inputs, pred in zip(instances, predictions):
    if inputs[constants.USER_KEY]:
      print("Recommended songs for", pred[constants.USER_KEY])
      print("Title | Similarity")
      for item_id, sim in zip(pred["user_top_k"], pred["user_sims"]):
        print(item_id, "|", sim)
      print("------")
    if inputs[constants.ITEM_KEY]:
      print("Recommended songs for", pred[constants.ITEM_KEY])
      print("Title | Similarity")
      for item_id, sim in zip(pred["item_top_k"], pred["item_sims"]):
        print(item_id, "|", sim)
      print("------")