code: def test_get_qval_max_pooling(
      self, filters, strides, pool_strides, pool_shapes
  ):
      env = GymEnv(DummyDiscretePixelEnv())
      obs = env.reset()[0]
  
      with mock.patch(
          (
              "garage.tf.models."
              "cnn_mlp_merge_model.CNNModelWithMaxPooling"
          ),
          new=SimpleCNNModelWithMaxPooling,
      ):
          with mock.patch(
              ("garage.tf.models." "cnn_mlp_merge_model.MLPMergeModel"),
              new=SimpleMLPMergeModel,
          ):
              qf = ContinuousCNNQFunction(
                  env_spec=env.spec,
                  filters=filters,
                  strides=strides,
                  max_pooling=True,
                  pool_strides=pool_strides,
                  pool_shapes=pool_shapes,
              )
  
      action_dim = env.action_space.shape
  
      obs = env.step(1).observation
  
      act = np.full(action_dim, 0.5)
      expected_output = np.full((1,), 0.5)
  
      outputs = qf.get_qval([obs], [act])
  
      assert np.array_equal(outputs[0], expected_output)
  
      outputs = qf.get_qval([obs, obs, obs], [act, act, act])
  
      for output in outputs:
          assert np.array_equal(output, expected_output)
  
imports: import pickle
  from unittest import mock
  import numpy
  import pytest
  import tensorflow
  from garage.envs import GymEnv
  from garage.tf.q_functions import ContinuousCNNQFunction
  from tests.fixtures import TfGraphTestCase
  from tests.fixtures.envs.dummy import DummyDictEnv, DummyDiscreteEnv, DummyDiscretePixelEnv
  from tests.fixtures.models import SimpleCNNModel, SimpleCNNModelWithMaxPooling, SimpleMLPMergeModel
label_desc: Use image node_id 2 for calling the TestContinuousCNNQFunction obj's underlying member method code with example usage: obj.test_get_qval_max_pooling(filters, strides, pool_strides, pool_shapes) without return types