update States Tutorial part 2

Explanation of yaml file with matching line numbers
Merge pull request #19245 from manonthemat/develop

update States Tutorial part 2
Python 3 compat iterator
Convert last remaining cases of generating JID manually with utils function