code: def testBlockingCheckpointSave(self):
      saver = mock.create_autospec(
          policy_saver.PolicySaver, instance=True
      )
      async_saver = async_policy_saver.AsyncPolicySaver(saver)
      path1 = os.path.join(self.get_temp_dir(), "save_model")
      path2 = os.path.join(self.get_temp_dir(), "save_model2")
  
      self.evaluate(tf.compat.v1.global_variables_initializer())
      async_saver.save_checkpoint(path1)
      async_saver.save_checkpoint(path2, blocking=True)
  
      saver.save_checkpoint.assert_has_calls(
          [mock.call(path1), mock.call(path2)]
      )
      # Have to close the saver to avoid hanging threads that will prevent OSS
      # tests from finishing.
      async_saver.close()
  
file_path: agents/tf_agents/policies/async_policy_saver_test.py
imports: import os
  from absl.testing.absltest import mock
  import tensorflow
  from tf_agents.networks import q_network
  from tf_agents.policies import async_policy_saver
  from tf_agents.policies import policy_saver
  from tf_agents.policies import q_policy
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.utils import common
  from tf_agents.utils import test_utils
label_desc: Use image node_id 4 for calling the AsyncPolicySaverTest obj's underlying member method code with example usage: obj.testBlockingCheckpointSave() without return types