code: def test_respects_upper_bound_on_resumes(self):
      beaker = Mock()
      experiment_id = "foo"
      start_autoresume(self.connection, experiment_id, 5)
      beaker.get_status.return_value = BeakerStatus.preempted
      for i in range(10):
          beaker.resume.return_value = f"foo{i}"
          resume(self.connection, beaker)
      calls = [
          call.get_status("foo"),
          call.resume("foo"),
          call.get_status("foo0"),
          call.resume("foo0"),
          call.get_status("foo1"),
          call.resume("foo1"),
          call.get_status("foo2"),
          call.resume("foo2"),
          call.get_status("foo3"),
          call.resume("foo3"),
          call.get_status("foo4"),
      ]
      beaker.assert_has_calls(calls)
  
file_path: allennlp/scripts/tests/ai2_internal/resume_daemon_test.py
imports: import pytest
  import sqlite3
  from unittest.mock import call, Mock
  from allennlp.common.testing import AllenNlpTestCase
  from scripts.ai2_internal.resume_daemon import BeakerStatus, create_table, handler, logger, resume, start_autoresume
label_desc: Use image node_id 8 for calling the ResumeDaemonTest obj's underlying member method code with example usage: obj.test_respects_upper_bound_on_resumes() without return types