code: def test_adaptive_maxpool2d():
      x = jnp.arange(12.0).reshape(1, 3, 4)
      adaptive_pool = eqx.nn.AdaptiveMaxPool2d((2, 3))
      output = adaptive_pool(x)
      answer = jnp.array([[[5.0, 6.0, 7.0], [9.0, 10.0, 11.0]]])
      assert jnp.all(output == answer)
  
      adaptive_pool = eqx.nn.AdaptiveMaxPool2d((3, 4))
      output = adaptive_pool(x)
      assert jnp.all(output == x)
  
imports: import warnings
  from typing import Union
  import equinox
  import jax
  import jax.nn
  import jax.numpy
  import jax.random
  import pytest
label_desc: Use image node_id 39 for calling a global function with example usage: test_adaptive_maxpool2d() without return types