code: def test_wait_stop(self):
      def on_progress(progress_handle):
          progress_handle.wait_stop()
  
      with self._patch_mailbox() as (event_mock, _):
          mailbox, handle, result = get_test_setup()
          mock_on_progress = Mock(
              spec=on_progress, side_effect=on_progress
          )
          handle.add_progress(mock_on_progress)
  
          result.control.mailbox_slot = handle.address
          self.time_obj.add_timed_event(
              2, lambda: mailbox.deliver(result)
          )
  
          result = handle.wait(timeout=3)
          self.assertEqual(result, None)
          self.assertEqual(mock_on_progress.call_count, 1)
          if sys.version_info[:2] >= (
              3,
              8,
          ):  # call_args.args only in 3.8+
              self.assertIsInstance(
                  mock_on_progress.call_args.args[0], MailboxProgress
              )
  
imports: import sys
  import threading
  import time
  from contextlib import contextmanager
  from unittest import TestCase
  from unittest.mock import Mock, patch
  from parameterized import parameterized
  from wandb.proto import wandb_internal_pb2
  from wandb.sdk.lib.mailbox import Mailbox, MailboxProbe, MailboxProgress
label_desc: Use image node_id 7 for calling the TestWithMockedTime obj's underlying member method code with example usage: obj.test_wait_stop() without return types