code: def test_queued_experiment_restarts_with_correct_allocation_id(
      restartable_managed_cluster: ManagedCluster,
  ) -> None:
      exp_id = exp.create_experiment(
          conf.fixtures_path("no_op/single-medium-train-step.yaml"),
          conf.fixtures_path("no_op"),
          ["--config", "resources.slots_per_trial=9999"],
      )
      exp.wait_for_experiment_state(exp_id, EXP_STATE.QUEUED)
  
      restartable_managed_cluster.kill_master()
      log_marker = str(uuid.uuid4())
      restartable_managed_cluster.log_marker(log_marker)
      restartable_managed_cluster.restart_master()
  
      err = 'duplicate key value violates unique constraint \\"allocations_allocation_id_key\\"'
      past_marker = False
      with open(DEVCLUSTER_MASTER_LOG_PATH) as lf:
          for line in lf.readlines():
              if not past_marker:
                  if log_marker in line:
                      past_marker = True
                  continue
  
              if err in line:
                  pytest.fail(
                      f"allocation id save failure after restart: {line}"
                  )
  
imports: import json
  import subprocess
  import time
  import uuid
  from pathlib import Path
  from typing import Any, Dict, Iterator, Tuple
  import pytest
  from determined.common.api.bindings import experimentv1State
  from tests import config
  from tests import experiment
  from .managed_cluster import ManagedCluster
  from .utils import assert_command_succeeded, get_command_info, run_command, wait_for_command_state
label_desc: Use image node_id 13 for calling a global function with example usage: test_queued_experiment_restarts_with_correct_allocation_id(restartable_managed_cluster) without return types