code: def test_avg_pool2d(self):
      class QAvgPool2dModule(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.quant1 = torch.ao.quantization.QuantStub()
              self.dequant = torch.ao.quantization.DeQuantStub()
  
          def forward(self, x):
              res = torch.nn.functional.avg_pool2d(
                  self.quant1(x), kernel_size=2, stride=1, padding=0
              )
              return self.dequant(res)
  
      x = np.random.rand(1, 2, 8, 8).astype("float32")
      self.generic_test(
          QAvgPool2dModule(),
          (x,),
          input_names=["x"],
          relaxed_check=True,
      )
  
imports: import io
  import caffe2.python.onnx.backend
  import numpy
  import onnx
  import pytorch_test_common
  import torch.ao.nn.quantized
  import torch.nn
  import torch.onnx
  from torch.testing._internal import common_utils
label_desc: Use image node_id 9 for calling the TestQuantizedOps obj's underlying member method code with example usage: obj.test_avg_pool2d() and returns: self