It'd be neater if the description for the nested function would be written as a docstring.