code: def test_restore_from_golden(self, golden, replicator_fn):
      replicator = self.replicator_or_skip(
          replicator_fn, use_function=False
      )
  
      with replicator.scope():
          module = golden.create_module()
          variables = golden.create_all_variables(module)
      checkpoint = TestCheckpoint(golden=golden, module=module)
      checkpoint.restore_latest(assert_consumed=True)
      for variable in variables:
          self.assertAllEqual(
              variable.read_value(),
              goldens.range_like(variable),
              msg=variable.name,
          )
  
imports: import os
  from absl import logging
  from absl.testing import absltest
  from absl.testing import parameterized
  from sonnet.src import test_utils
  from sonnet.src.conformance import goldens
  from sonnet.src.distribute import replicator
  from sonnet.src.distribute import replicator_test_utils
  import tensorflow
  import tree
label_desc: Use image node_id 3 for calling the ReplicatorCheckpointTest obj's underlying member method code with example usage: obj.test_restore_from_golden(golden, replicator_fn) without return types