code: def test_adaptive_pooling_1d():
      pooler = torch.nn.AdaptiveAvgPool1d(output_size=3)
      patch_func = patched_module.torch_nn_adapative_pooling_1d
  
      data = torch.rand(3, 4)
      output = pooler(data)
      _assert_output_shape(
          data=data,
          module=pooler,
          patch_fn=patch_func,
          expect_exception=False,
          output_shape=output.shape,
      )
  
      data = torch.rand(2, 3, 4)
      output = pooler(data)
      _assert_output_shape(
          data=data,
          module=pooler,
          patch_fn=patch_func,
          expect_exception=False,
          output_shape=output.shape,
      )
  
      data = torch.rand(2, 3, 4, 5)
      _assert_output_shape(
          data=data,
          module=pooler,
          patch_fn=patch_func,
          expect_exception=True,
          output_shape=None,
      )
  
file_path: colossalai/tests/test_fx/test_tracer/test_patched_module.py
imports: import torch
  from colossalai.fx.tracer.meta_patch import patched_module
  from colossalai.testing import clear_cache_before_run
label_desc: Use image node_id 15 for calling a global function with example usage: test_adaptive_pooling_1d() without return types