def imshow_grid(images, grid=None, showfun=None, **opt):
<EOL>showfun = showfun or plt.imshow<EOL>count = len(images)<EOL>grid = grid or grid_recommend(count, sorted(images[<NUM_LIT:0>].shape[:<NUM_LIT:2>]))<EOL>res = []<EOL>for i, img in enumerate(images):<EOL><INDENT>plt.subplot2grid(grid, (i % grid[<NUM_LIT:0>], i // grid[<NUM_LIT:0>]))<EOL>res.append(showfun(img.squeeze(), **opt))<EOL><DEDENT>return res<EOL>
:param images: nhwc
:return: