code: def dense_packed(cfg, data, weight, bias=None, out_dtype=None):
      """Dense function declaration."""
  
      # Make sure that the dense operator is packed
      if len(data.shape) != 4 or len(weight.shape) != 4:
          raise topi.InvalidShapeError()
  
      # Derive shapes
      ishape = topi.utils.get_const_tuple(data.shape)
      wshape = topi.utils.get_const_tuple(weight.shape)
      oshape = (
          data.shape[0],
          weight.shape[0],
          data.shape[2],
          weight.shape[2],
      )
  
      # Reduction axes (input channel)
      assert ishape[1] == wshape[1]
      assert ishape[3] == wshape[3]
      k_o = te.reduce_axis((0, ishape[1]), name="k_o")
      k_i = te.reduce_axis((0, ishape[3]), name="k_i")
      res = te.compute(
          oshape,
          lambda b_o, c_o, b_i, c_i: te.sum(
              data[b_o, k_o, b_i, k_i].astype(out_dtype)
              * weight[c_o, k_o, c_i, k_i].astype(out_dtype),
              axis=[k_o, k_i],
          ),
          name="res",
          tag="dense_pack",
      )
  
      cfg.add_flop(
          2
          * np.prod(topi.utils.get_const_tuple(oshape))
          * ishape[1]
          * ishape[3]
      )
  
      return res
  
file_path: tvm/vta/python/vta/top/vta_dense.py
imports: import numpy
  import tvm
  from tvm import te
  from tvm import autotvm
  from tvm import topi
  from ..environment import get_env
label_desc: Use image node_id 2 for calling a global function with example usage: dense_packed(cfg, data, weight, bias, out_dtype) and returns: res