code: def l2(x: JaxArray) -> JaxArray:
      """Computes the L2 loss.
  
      Args:
          x: n-dimensional tensor of floats.
  
      Returns:
          scalar tensor containing the l2 loss of x.
      """
  
      return 0.5 * (x**2).sum()
  
file_path: objax/objax/functional/loss.py
imports: from typing import Union, Iterable, Optional
  import jax.numpy
  from objax.functional.core import logsumexp
  from objax.typing import JaxArray
  import warnings
label_desc: Use image node_id 3 for calling a global function with example usage: l2(x) and returns: unknown