Do you have the code for the __init__ of  NotMNISTDataLoader ? There is a lamda function in there like lambda x: x+1 that needs to be changed to
def tmp_func(x):
    return x + 1

And replace the lambda by tmp_func.