docstr: Test if policy is pickable.
docstr_tok: ["Test","if","policy","is","pickable","."]
code: def test_is_pickleable(
      self, hidden_channels, kernel_sizes, strides, hidden_sizes
  ):
      """Test if policy is pickable."""
      env = GymEnv(DummyDiscretePixelEnv(), is_image=True)
      policy = CategoricalCNNPolicy(
          env_spec=env.spec,
          image_format="NHWC",
          kernel_sizes=kernel_sizes,
          hidden_channels=hidden_channels,
          strides=strides,
          hidden_sizes=hidden_sizes,
      )
      env.reset()
      obs = env.step(1).observation
  
      output_action_1, _ = policy.get_action(obs)
  
      p = cloudpickle.dumps(policy)
      policy_pickled = cloudpickle.loads(p)
      output_action_2, _ = policy_pickled.get_action(obs)
  
      assert env.action_space.contains(output_action_1)
      assert env.action_space.contains(output_action_2)
      assert output_action_1.shape == output_action_2.shape
  
file_path: garage/tests/garage/torch/policies/test_categorical_cnn_policy.py
imports: import cloudpickle
  import pytest
  import torch
  from garage.envs import GymEnv
  from garage.torch.policies import CategoricalCNNPolicy
  from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscretePixelEnv
label_desc: Use image node_id 4 for calling the TestCategoricalCNNPolicy obj's underlying member method code with example usage: obj.test_is_pickleable(hidden_channels, kernel_sizes, strides, hidden_sizes) without return types