code: def test_noop_pause() -> None:
      """
      Walk through starting, pausing, and resuming a single no-op experiment.
      """
      experiment_id = exp.create_experiment(
          conf.fixtures_path("no_op/single-medium-train-step.yaml"),
          conf.fixtures_path("no_op"),
          None,
      )
      exp.wait_for_experiment_state(
          experiment_id, bindings.experimentv1State.RUNNING
      )
  
      # Wait for the only trial to get scheduled.
      exp.wait_for_experiment_active_workload(experiment_id)
  
      # Wait for the only trial to show progress, indicating the image is built and running.
      exp.wait_for_experiment_workload_progress(experiment_id)
  
      # Pause the experiment. Note that Determined does not currently differentiate
      # between a "stopping paused" and a "paused" state, so we follow this check
      # up by ensuring the experiment cleared all scheduled workloads.
      exp.pause_experiment(experiment_id)
      exp.wait_for_experiment_state(
          experiment_id, bindings.experimentv1State.PAUSED
      )
  
      # Wait at most 20 seconds for the experiment to clear all workloads (each
      # train step should take 5 seconds).
      for _ in range(20):
          workload_active = exp.experiment_has_active_workload(
              experiment_id
          )
          if not workload_active:
              break
          else:
              time.sleep(1)
      check.true(
          not workload_active,
          "The experiment cannot be paused within 20 seconds.",
      )
  
      # Resume the experiment and wait for completion.
      exp.activate_experiment(experiment_id)
      exp.wait_for_experiment_state(
          experiment_id, bindings.experimentv1State.COMPLETED
      )
  
imports: import copy
  import os
  import shutil
  import tempfile
  import time
  import pytest
  from determined.common import check, util
  from determined.common.api import bindings
  from determined.experimental import Determined
  from tests import config
  from tests import experiment
label_desc: Use image node_id 1 for calling a global function with example usage: test_noop_pause() without return types