code: def test_experiment_manipulation(client: _client.Determined) -> None:
      exp = _make_live_experiment(client)
  
      exp.pause()
      with pytest.raises(
          ValueError, match="Make sure the experiment is active"
      ):
          # Wait throws an error if the experiment is paused by a user.
          exp.wait(interval=0.1)
  
      exp.activate()
  
      exp.cancel()
      assert exp.wait() == _client.ExperimentState.CANCELED
  
      assert isinstance(exp.config, dict)
  
      # Delete this experiment, but continue the test while it's deleting.
      exp.delete()
      deleting_exp = exp
  
      # Create another experiment and kill it.
      exp = _make_live_experiment(client)
      exp.kill()
      assert exp.wait() == _client.ExperimentState.CANCELED
  
      # Test remaining methods
      exp.archive()
      assert bindings.get_GetExperiment(
          client._session, experimentId=exp.id
      ).experiment.archived
  
      exp.unarchive()
      assert not bindings.get_GetExperiment(
          client._session, experimentId=exp.id
      ).experiment.archived
  
      # Create another experiment and kill its trial.
      exp = _make_live_experiment(client)
      trial = exp.get_trials()[0]
      trial.kill()
      assert exp.wait() == _client.ExperimentState.CANCELED
  
      # Make sure that the experiment we deleted earlier does actually delete.
      with pytest.raises(errors.APIException):
          for _ in range(300):
              client.get_experiment(deleting_exp.id).get_trials()
              time.sleep(0.1)
  
file_path: determined/e2e_tests/tests/test_sdk.py
imports: import os
  import random
  import shutil
  import tempfile
  import time
  import pytest
  from determined.common import util
  from determined.common.api import bindings, errors
  from determined.common.experimental import resource_pool
  from determined.common.experimental.metrics import TrialMetrics
  from determined.experimental import client
  from tests import config
label_desc: Use image node_id 4 for calling a global function with example usage: test_experiment_manipulation(client) without return types