code: def helper_test_fake_quantize_unary_op(
      self, fp32_op, pos_values=False
  ):
      for dtype in ["int8", "uint8"]:
          x = relay.var("x", shape=[1, 3, 3, 3], dtype=dtype)
  
          zero = -128 if dtype == "int8" else 0
          if pos_values:
              # Use a positive range for quanitzed ops that only work on positive values
              input_mid_point = relay.const(zero)
              output_mid_point = relay.const(zero)
          else:
              input_mid_point = relay.const(
                  np.random.randint(0, 255) + zero
              )
              output_mid_point = relay.const(
                  np.random.randint(0, 255) + zero
              )
  
          input_scale = relay.const(np.random.rand())
          output_scale = relay.const(np.random.rand())
  
          x = relay.qnn.op.dequantize(x, input_scale, input_mid_point)
          op = fp32_op(x)
  
          op = relay.qnn.op.quantize(
              op, output_scale, output_mid_point, out_dtype=dtype
          )
  
          x_np = np.random.randint(
              0 + zero, 255 + zero, size=[1, 3, 3, 3], dtype=dtype
          )
  
          compare_fq_to_int(op, [x_np], True)
  
imports: import numpy
  import pytest
  import tvm
  import tvm.testing
  from tvm import relay
  from tvm.relay.transform import fake_quantization_to_integer
label_desc: Use image node_id 1 for calling the TestUnaryQNNOp obj's underlying member method code with example usage: obj.helper_test_fake_quantize_unary_op(fp32_op, pos_values) without return types