code: def _do_bias_and_requantize(
      output,
      bias,
      input_scale,
      weight_scale,
      output_scale,
      output_zero_point,
      with_relu,
  ):
      """Output processing for conv and linear"""
      # this is a vector for per channel case
      requant_input_scale = _expr.const(
          _get_numpy(input_scale) * _get_numpy(weight_scale)
      )
      # Torch does bias add and requanize scale in fp32
      # refer to third_party/fbgemm/include/fbgemm/OutputProcessing-inl.h
      # Instead, we do bias add in int32 and use qnn requantize, which needs
      # integer input.
      # We observed no loss in accuracy in doing this way, and it is better
      # for tvm because bias quantization can be done at compile time
      # Instead, the torch way requires rounding of activation at runtime
  
      if bias is not None:
          requantize_input = _op.nn.bias_add(output, bias)
      else:
          requantize_input = output
  
      requantized = relay.qnn.op.requantize(
          requantize_input,
          requant_input_scale,
          relay.const(0, "int32"),
          output_scale,
          output_zero_point,
          out_dtype="int32",
          axis=1,
      )
      clip_min = 0
      if with_relu:
          clip_min = _get_scalar(output_zero_point)
  
      clip = _op.tensor.clip(requantized, clip_min, 255.0)
      return _op.cast(clip, dtype="uint8")
  
imports: import numpy
  import tvm
  from tvm import relay
  from tvm.relay import expr
  from tvm.relay import op
  from tvm.relay.frontend.common import infer_shape
  from .common import logger
  from .pytorch_utils import is_version_greater_than
label_desc: Use image node_id 23 for calling a global function with example usage: _do_bias_and_requantize(output, bias, input_scale, weight_scale, output_scale, output_zero_point, with_relu) and returns: _op