Small refactoring - move local variables closer to the code block where they are used.
Small refactoring - move local variables closer to the code block where they are used.

PiperOrigin-RevId: 449621128

google/deepvariant,google/deepvariant,google/deepvariant