code: def test_quantized_conv2d(
      self,
      use_relu,
      quant_dtype,
      padding,
      stride,
      height,
      width,
      in_channels,
      out_channels,
      kernel_size,
      dilation,
      bias,
  ):
      if padding == "same" and stride != 1:
          return
  
      class Model(torch.nn.Module):
          def __init__(self):
              super().__init__()
              if use_relu:
                  conv = torch.nn.intrinsic.quantized.ConvReLU2d
              else:
                  conv = torch.nn.quantized.Conv2d
              self.quant_conv = conv(
                  in_channels=in_channels,
                  out_channels=out_channels,
                  kernel_size=kernel_size,
                  stride=stride,
                  padding=padding,
                  dilation=dilation,
                  bias=bias,
                  dtype=quant_dtype,
              )
  
          def forward(self, x):
              x = torch.quantize_per_tensor(
                  x, scale=1.0, zero_point=0, dtype=quant_dtype
              )
              x = self.quant_conv(x)
              return torch.dequantize(x)
  
      model = Model()
  
      self.run_compare_torch(
          [(1, in_channels, height, width)],
          model,
      )
  
imports: import itertools
  from typing import Optional
  import numpy
  import pytest
  import torch
  import torchvision
  import coremltools
  from coremltools import TensorType
  from coremltools._deps import _HAS_TORCH, _HAS_TORCH_VISION, MSG_TORCH_NOT_FOUND, MSG_TORCH_VISION_NOT_FOUND
  from coremltools.converters.mil.testing_utils import get_op_types_in_program
  from .testing_utils import TorchBaseTest
label_desc: Use image node_id 2 for calling the TestPytorchQuantizedOps obj's underlying member method code with example usage: obj.test_quantized_conv2d(use_relu, quant_dtype, padding, stride, height, width, in_channels, out_channels, kernel_size, dilation, bias) and returns: torch