code: def _linear(with_relu=False):
      # similar to conv
      def _impl(inputs, _):
          weight = inputs[1][0]
          weight_scale = inputs[1][1]
          weight_zero_point = inputs[1][2]
          output_scale = _expr.const(inputs[2])
          output_zero_point = _expr.const(inputs[3])
          assert (
              len(inputs) == 6
          ), "Input quant params not found in op inputs"
          # Manually added by add_input_quant_params_to_op_inputs above
          input_scale = _expr.const(inputs[4])
          input_zero_point = _expr.const(inputs[5])
  
          weight_shape = infer_shape(weight)
          dense = relay.qnn.op.dense(
              inputs[0],
              weight,
              input_zero_point,
              weight_zero_point,
              input_scale,
              weight_scale,
              units=weight_shape[0],
          )
          bias_var = inputs[1][3]
  
          return _do_bias_and_requantize(
              dense,
              bias_var,
              input_scale,
              weight_scale,
              output_scale,
              output_zero_point,
              with_relu,
          )
  
      return _impl
  
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 25 for calling a global function with example usage: _linear(with_relu) and returns: _impl, _do_bias_and_requantize