code: def test_experiment_resume_with_id():
      experiment = _create_experiment(100)
      experiment.run(wait_completion=False)
  
      time.sleep(_wait_seconds)
  
      num_trials = len(experiment.list_trial_jobs())
      experiment.stop()
  
      time.sleep(
          _wait_seconds
      )  # Otherwise manifest is not updated. Experiment is still "running".
  
      experiment2 = Experiment(None, id=experiment.id)
      experiment2.run_or_resume(wait_completion=False)
  
      time.sleep(_wait_seconds)
  
      assert len(experiment2.list_trial_jobs()) > num_trials
      assert experiment2.get_status() == "RUNNING"
  
      experiment2.stop()
  
      time.sleep(_wait_seconds)
  
      experiment3 = Experiment(None, id=experiment.id)
      try:
          experiment3.view(non_blocking=True)
  
          time.sleep(_refresh_seconds)
          assert experiment3.get_status() == "VIEWED"
      finally:
          experiment3.stop()
  
file_path: nni/test/ut/experiment/test_experiment.py
imports: import time
  import sys
  from pathlib import Path
  from nni.experiment import Experiment
label_desc: Use image node_id 4 for calling a global function with example usage: test_experiment_resume_with_id() without return types