code: def dense(expr, type_map):
      """Rewrite a dense op"""
      attrs = {**expr.attrs}
      attrs.pop("out_dtype")
      x, weight = expr.args
      x_t = type_map[x]
      w_t = type_map[weight]
      dense_scale = fold_constant(x_t.scale * w_t.scale)
      dense_zp = get_zeros(dense_scale)
      out = relay.qnn.op.dense(
          x,
          weight,
          x_t.zero_point,
          w_t.zero_point,
          x_t.scale,
          w_t.scale,
          **attrs,
      )
      return [
          out,
          TensorAffineType(
              dense_scale, dense_zp, out.attrs.out_dtype, 1
          ),
      ]
  
imports: import numpy
  import tvm
  from tvm import relay
  from tvm.ir import TensorAffineType, TupleAffineType
  from tvm.relay.qnn.op import canonicalizations
  from tvm.tir import bijective_layout
  from ..op import register_fake_quantization_to_integer, register_optional_fake_quantization_to_integer
label_desc: Use image node_id 15 for calling a global function with example usage: dense(expr, type_map) and returns: list