pyphoto is implemented as the single file of example - though it gets some utility for free by reusing the thumbnail generation function of the viewer_thumbs module that we originally wrote near the end of in example - to spare you from having to flip back and forth too muchhere' copy of the code of the thumbs function imported and used hereimported from def makethumbs(imgdirsize=( )subdir='thumbs')returns list of (image filenamethumb image object)thumbdir os path join(imgdirsubdirif not os path exists(thumbdir)os mkdir(thumbdirthumbs [for imgfile in os listdir(imgdir)thumbpath os path join(thumbdirimgfileif os path exists(thumbpath)thumbobj image open(thumbpaththumbs append((imgfilethumbobj)elseprint('making'thumbpathimgpath os path join(imgdirimgfiletryuse already created pyphotoan image viewer and resizer