Ensure name/device are restored in pickle tests.
Ensure name/device are restored in pickle tests.

PiperOrigin-RevId: 250253860
Change-Id: I33a697f7b0e5225482f41931a5d5dbc1b13a6b44

deepmind/sonnet,deepmind/sonnet