def foo(): def bar(): def baz(): if comments: for comment in comments: record += ' \n'