code: def dense(x, fmaps, **kwargs):
      if len(x.shape) > 2:
          x = tf.reshape(
              x, [-1, np.prod([d.value for d in x.shape[1:]])]
          )
      w = get_weight([x.shape[1].value, fmaps], **kwargs)
      w = tf.cast(w, x.dtype)
      return tf.matmul(x, w)
  
imports: import numpy
  import tensorflow
  import dnnlib
  import dnnlib.tflib
label_desc: Use image node_id 8 for calling a global function with example usage: dense(x, fmaps) and returns: tf