code: def test_is_pickleable(
      batch_size, hidden_channels, kernel_sizes, strides
  ):
      env_spec = GymEnv(DummyBoxEnv(obs_dim=(3, 10, 10))).spec
      obs_dim = env_spec.observation_space.shape
      obs = torch.ones((batch_size,) + obs_dim, dtype=torch.float32)
  
      qf = DiscreteCNNQFunction(
          env_spec=env_spec,
          image_format="NCHW",
          kernel_sizes=kernel_sizes,
          strides=strides,
          mlp_hidden_nonlinearity=None,
          cnn_hidden_nonlinearity=None,
          hidden_channels=hidden_channels,
          hidden_sizes=hidden_channels,
          hidden_w_init=nn.init.ones_,
          output_w_init=nn.init.ones_,
      )
  
      output1 = qf(obs)
      p = pickle.dumps(qf)
      qf_pickled = pickle.loads(p)
      output2 = qf_pickled(obs)
  
      assert torch.eq(output1, output2).all()
  
file_path: garage/tests/garage/torch/q_functions/test_discrete_cnn_q_function.py
imports: import pickle
  import pytest
  import torch
  from torch import nn
  from garage.envs import GymEnv
  from garage.torch.q_functions import DiscreteCNNQFunction
  from tests.fixtures.envs.dummy import DummyBoxEnv
label_desc: Use image node_id 2 for calling a global function with example usage: test_is_pickleable(batch_size, hidden_channels, kernel_sizes, strides) without return types