Boilerplate code for ex3_nn in Python.