Below are the instructions, as well as the provided pseudocode:
Instructions: find the labels of the top k nearest neighbors
Inpu