code: def testSavedModel(self, strat, is_save_in_scope):
      class CustomModule(module.Module):
          def __init__(self):
              super(CustomModule, self).__init__()
              self.g = rng.Generator.from_seed(0)
  
          @def_function.function
          def __call__(self):
              return self.g.state
  
          @def_function.function
          def mutate(self):
              self.g.normal([])
  
      with strat.scope():
          m = CustomModule()
          m.mutate()
          state_before = m()
          path = os.path.join(self.get_temp_dir(), "saved_model")
      if is_save_in_scope:
          with strat.scope():
              save.save(m, path)
      else:
          save.save(m, path)
      with strat.scope():
          m.mutate()
          state_before_2 = m()
  
      imported = load.load(path)
      state_after = imported()
      self.assertAllEqual(state_before, state_after)
      imported.mutate()
      state_after_2 = imported()
      self.assertAllEqual(state_before_2, state_after_2)
  
imports: import functools
  import os
  from absl.testing import parameterized
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.compat import v2_compat
  from tensorflow.python.distribute import combinations
  from tensorflow.python.distribute import multi_process_runner
  from tensorflow.python.distribute import sharded_variable
  from tensorflow.python.distribute import strategy_combinations
  from tensorflow.python.distribute import values
  from tensorflow.python.distribute.coordinator import cluster_coordinator
  from tensorflow.python.distribute.mirrored_strategy import MirroredStrategy
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import test_combinations
  from tensorflow.python.framework import test_util
  from tensorflow.python.module import module
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import array_ops_stack
  from tensorflow.python.ops import stateful_random_ops
  from tensorflow.python.platform import test
  from tensorflow.python.saved_model import load
  from tensorflow.python.saved_model import save
  from tensorflow.python.util import deprecation
label_desc: Use image node_id 10 for calling the GeneratorTest obj's underlying member method code with example usage: obj.testSavedModel(strat, is_save_in_scope) and returns: self