code: def test_experiment_resume_view():
      experiment = _create_experiment(100)
      experiment.run(wait_completion=False)
  
      time.sleep(_wait_seconds)
  
      assert experiment.get_status() == "RUNNING"
      stats = {
          s["trialJobStatus"]: s["trialJobNumber"]
          for s in experiment.get_job_statistics()
      }
      assert sum(stats.values()) > 0
      assert all(
          s in ["WAITING", "RUNNING", "SUCCEEDED"] for s in stats
      )
  
      experiment.stop()
  
      experiment.resume(wait_completion=False)
  
      time.sleep(_wait_seconds)
  
      assert experiment.get_status() == "RUNNING"
      stats2 = {
          s["trialJobStatus"]: s["trialJobNumber"]
          for s in experiment.get_job_statistics()
      }
      assert sum(stats2.values()) > sum(
          stats.values()
      ), f"{stats2} vs. {stats}"
      assert all(
          s in ["WAITING", "RUNNING", "SUCCEEDED"] for s in stats
      )
  
      experiment.stop()
  
      try:
          experiment.view(non_blocking=True)
  
          time.sleep(_refresh_seconds)  # Wait for starting to run.
  
          stats3 = {
              s["trialJobStatus"]: s["trialJobNumber"]
              for s in experiment.get_job_statistics()
          }
          assert sum(stats3.values()) >= sum(
              stats2.values()
          ), f"{stats3} vs. {stats2}"
          assert len(experiment.list_trial_jobs()) == sum(
              stats3.values()
          )
          assert experiment.get_status() == "VIEWED"
      finally:
          experiment.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 3 for calling a global function with example usage: test_experiment_resume_view() without return types