Python: improve indented node rendering to not print a blank line if it doesn't
resolve to anything. This makes assertions actually not take up any space, among
other things.