class_docstr: Tests, whether Policies' states can be swapped out via their state on a GPU.
class_docstr_tok: ["Tests",",","whether","Policies","'","states","can","be","swapped","out","via","their","state","on","a","GPU","."]
code: def setUpClass(cls) -> None:
      ray.init()
  
file_path: ray/rllib/policy/tests/test_policy_state_swapping.py
imports: import gymnasium
  import numpy
  import tree
  import unittest
  import ray
  from ray.rllib.algorithms.appo import APPOConfig, APPOTF1Policy, APPOTF2Policy, APPOTorchPolicy
  from ray.rllib.policy.policy_map import PolicyMap
  from ray.rllib.utils.framework import try_import_tf
  from ray.rllib.utils.test_utils import check, framework_iterator
  from ray.rllib.utils.tf_utils import get_tf_eager_cls_if_necessary
label_desc: Use image node_id 1 for calling the TestPolicyStateSwapping obj's underlying member method code with example usage: obj.setUpClass(cls) without return types