Make return calculation conditional to significantly speed up pipelines that don't use it.
Make return calculation conditional to significantly speed up pipelines that don't use it.

PiperOrigin-RevId: 452239549
Change-Id: I5fae1834d07e32279f9fcda2c1e914c51a27cb82

deepmind/acme,deepmind/acme