code: def test_maxpool(self):
      module = torch.nn.MaxPool1d(2, stride=1)
  
      ops_9 = [
          {
              "op_name": "MaxPool",
              "attributes": [
                  {"name": "kernel_shape", "ints": [2], "type": 7},
                  {"name": "pads", "ints": [0, 0], "type": 7},
                  {"name": "strides", "ints": [1], "type": 7},
              ],
          }
      ]
      ops_10 = [
          {
              "op_name": "MaxPool",
              "attributes": [
                  {"name": "ceil_mode", "i": 0, "type": 2},
                  {"name": "dilations", "ints": [1], "type": 7},
                  {"name": "kernel_shape", "ints": [2], "type": 7},
                  {"name": "pads", "ints": [0, 0], "type": 7},
                  {"name": "strides", "ints": [1], "type": 7},
              ],
          }
      ]
      ops = {9: ops_9, 10: ops_10}
      x = torch.randn(20, 16, 50)
      check_onnx_opsets_operator(module, x, ops, opset_versions=[9, 10])
  
      # add test with dilations
      module = torch.nn.MaxPool1d(2, stride=1, dilation=2)
  
      ops_10 = [
          {
              "op_name": "MaxPool",
              "attributes": [
                  {"name": "ceil_mode", "i": 0, "type": 2},
                  {"name": "dilations", "ints": [2], "type": 7},
                  {"name": "kernel_shape", "ints": [2], "type": 7},
                  {"name": "pads", "ints": [0, 0], "type": 7},
                  {"name": "strides", "ints": [1], "type": 7},
              ],
          }
      ]
      ops = {10: ops_10}
      x = torch.randn(20, 16, 50)
      check_onnx_opsets_operator(module, x, ops, opset_versions=[10])
  
imports: import io
  import itertools
  import onnx
  import pytorch_test_common
  import torch
  import torch.onnx
  from torch.nn import Module
  from torch.onnx import producer_name, producer_version
  from torch.onnx._globals import GLOBALS
  from torch.testing._internal import common_utils
label_desc: Use image node_id 3 for calling the TestONNXOpset obj's underlying member method code with example usage: obj.test_maxpool() without return types