code to the top of the file to import two libraries necessary for image manipulation main py import numpy as np from pil import image then at the end of the fileadd the following line of code to load the test image of the handwritten digitmain py img np invert(image open("test_img png"convert(' ')ravel(the open function of the image library loads the test image as array containing the three rgb color channels and the alpha transparency this is not the same representation we used previously when reading in the dataset with tensorflowso we'll need to do some extra work to match the format firstwe use the convert function with the parameter to reduce the rgba representation to one grayscale color channel we store this as numpy array and invert it using np invertbecause the current matrix represents black as and white as whereas we need the opposite finallywe call ravel to flatten the array now that the image data is structured correctlywe can run session in the same way as previouslybut this time only feeding in the single