code: def dense(
      scope,
      inputs,
      features,
      bias=True,
      dtype=jnp.float32,
      precision=None,
      kernel_init=default_kernel_init,
      bias_init=initializers.zeros_init(),
  ):
      """Applies a linear transformation to the inputs along the last dimension.
  
      Args:
        inputs: The nd-array to be transformed.
        features: the number of output features.
        bias: whether to add a bias to the output (default: True).
        dtype: the dtype of the computation (default: float32).
        precision: numerical precision of the computation see `jax.lax.Precision`
          for details.
        kernel_init: initializer function for the weight matrix.
        bias_init: initializer function for the bias.
      Returns:
        The transformed input.
      """
      inputs = jnp.asarray(inputs, dtype)
      kernel = scope.param(
          "kernel", kernel_init, (inputs.shape[-1], features)
      )
      kernel = jnp.asarray(kernel, dtype)
      y = lax.dot_general(
          inputs,
          kernel,
          (((inputs.ndim - 1,), (0,)), ((), ())),
          precision=precision,
      )
      if bias:
          bias = scope.param("bias", bias_init, (features,))
          bias = jnp.asarray(bias, dtype)
          y += jnp.reshape(bias, (1,) * (y.ndim - 1) + (-1,))
      return y
  
file_path: flax/flax/core/nn/linear.py
imports: from collections.abc import Iterable
  import jax.numpy
  import numpy
  from jax import lax
  from flax import struct
  from flax.core import Scope
  from flax.linen import initializers
label_desc: Use image node_id 3 for calling a global function with example usage: dense(scope, inputs, features, bias, dtype, precision, kernel_init, bias_init) and returns: y