please advice how to tackle the error: (NameError: name \'k\' is not defined ). Below the code for reducer fucntion:
import sys last_k = None max_v = 0 for