code: def test_is_pickleable(self):
      env = GymEnv(DummyDiscretePixelEnv())
      policy = CategoricalCNNPolicy(
          env_spec=env.spec,
          filters=((3, (32, 32)),),
          strides=(1,),
          padding="SAME",
          hidden_sizes=(4,),
      )
  
      env.reset()
      obs = env.step(1).observation
  
      with tf.compat.v1.variable_scope(
          "CategoricalCNNPolicy", reuse=True
      ):
          cnn_bias = tf.compat.v1.get_variable("CNNModel/cnn/h0/bias")
          bias = tf.compat.v1.get_variable("MLPModel/mlp/hidden_0/bias")
  
      cnn_bias.load(tf.ones_like(cnn_bias).eval())
      bias.load(tf.ones_like(bias).eval())
  
      state_input = tf.compat.v1.placeholder(
          tf.float32, shape=(None, None) + policy.input_dim
      )
      dist_sym = policy.build(state_input, name="dist_sym").dist
      output1 = self.sess.run(
          dist_sym.probs, feed_dict={state_input: [[obs]]}
      )
      p = pickle.dumps(policy)
  
      with tf.compat.v1.Session(graph=tf.Graph()) as sess:
          policy_pickled = pickle.loads(p)
          state_input = tf.compat.v1.placeholder(
              tf.float32, shape=(None, None) + policy.input_dim
          )
          dist_sym = policy_pickled.build(
              state_input, name="dist_sym"
          ).dist
          output2 = sess.run(
              dist_sym.probs, feed_dict={state_input: [[obs]]}
          )
          assert np.array_equal(output1, output2)
  
file_path: garage/tests/garage/tf/policies/test_categorical_cnn_policy.py
imports: import pickle
  from unittest import mock
  import numpy
  import pytest
  import tensorflow
  from garage.envs import GymEnv
  from garage.tf.policies import CategoricalCNNPolicy
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscretePixelEnv
label_desc: Use image node_id 3 for calling the TestCategoricalCNNPolicyWithModel obj's underlying member method code with example usage: obj.test_is_pickleable() without return types