code: def test_fixed_qparam_ops(self):
      class M(torch.nn.Module):
          def __init__(self):
              super().__init__()
              self.sigmoid = torch.nn.Sigmoid()
              self.hardsigmoid = torch.nn.Hardsigmoid()
              self.tanh = torch.nn.Tanh()
              self.quant = QuantStub()
              self.dequant = DeQuantStub()
  
          def forward(self, x):
              x = self.quant(x)
              x = self.sigmoid(x)
              x = self.hardsigmoid(x)
              x = self.tanh(x)
              x = self.dequant(x)
              return x
  
      m = M().train()
      m.qconfig = default_qat_qconfig
      m = prepare_qat(m)
      for attr in ["sigmoid", "hardsigmoid", "tanh"]:
          self.assertEqual(
              type(getattr(m, attr).activation_post_process),
              FixedQParamsFakeQuantize,
          )
      data = torch.randn(1, 3, 2, 4)
      before_convert = m(data)
      m = convert(m)
      after_convert = m(data)
      self.assertEqual(before_convert, after_convert)
      # make sure activation post process is removed
      for attr in ["sigmoid", "hardsigmoid", "tanh"]:
          # verify fake quant module is removd
          self.assertFalse(
              hasattr(getattr(m, attr), "activation_post_process")
          )
          # verify that hooks are removed
          self.assertTrue(
              len(getattr(m, attr)._forward_hooks.items()) == 0
          )
  
      # make sure no fake quantize module is inserted for eval mode
  
      def checkNoFQModule(m):
          for attr in ["sigmoid", "hardsigmoid", "tanh"]:
              self.assertFalse(
                  hasattr(getattr(m, attr), "activation_post_process")
              )
              self.assertTrue(
                  len(getattr(m, attr)._forward_hooks.items()) == 0
              )
  
      m = M().eval()
      m.qconfig = default_qconfig
      m = prepare(m)
      checkNoFQModule(m)
      m = convert(m)
      checkNoFQModule(m)
  
imports: import copy
  import math
  import torch
  import torch.nn
  import torch.backends.mkldnn
  from torch.nn import Conv2d, BatchNorm2d, ReLU, init
  from torch.ao.nn.intrinsic.qat import ConvBn2d, ConvBnReLU2d
  from torch.nn.modules.utils import _pair
  import torch.ao.nn.quantized
  import torch.ao.nn.quantized.dynamic
  import torch.ao.nn.qat
  import torch.ao.nn.intrinsic.qat
  import torch.ao.nn.qat.dynamic
  from torch.ao.quantization import prepare, convert, prepare_qat, quantize_qat, QuantStub, DeQuantStub, default_qconfig, default_qat_qconfig, default_embedding_qat_qconfig, default_symmetric_qnnpack_qat_qconfig, get_default_qat_qconfig, FixedQParamsFakeQuantize, FusedMovingAvgObsFakeQuantize, get_embedding_qat_module_mappings, get_embedding_static_quant_module_mappings, NoopObserver
  from torch.ao.quantization.qconfig import qconfig_equals
  from torch.testing._internal.common_quantization import DeFusedEmbeddingBagLinear, QuantizationTestCase, QuantStubModel, ManualLinearQATModel, ManualDropoutQATModel, ManualLinearDynamicQATModel, ManualConvLinearQATModel, ManualConvLinearSymmQATModel, ManualEmbeddingBagLinear, TwoLayerLinearModel, test_only_eval_fn, test_only_train_fn
  from torch.testing._internal.common_quantized import override_quantized_engine, supported_qengines, override_qengines
  from torch.testing._internal.common_utils import skipIfNoXNNPACK
  from hypothesis import given
  from hypothesis import strategies
  import torch.testing._internal.hypothesis_utils
  from functools import reduce
label_desc: Use image node_id 2 for calling the TestQuantizeEagerQATNumerics obj's underlying member method code with example usage: obj.test_fixed_qparam_ops() and returns: x