code: def test_layer_norm(getkey):
      ln = eqx.nn.LayerNorm(128)
      x = jrandom.uniform(getkey(), (128,))
      assert ln(x).shape == (128,)
  
      ln = eqx.nn.LayerNorm(
          shape=(128, 128), use_weight=False, use_bias=False
      )
      x = jrandom.uniform(getkey(), (128, 128))
      assert ln(x).shape == (128, 128)
  
      ln = eqx.nn.LayerNorm(10)
      x1 = jnp.linspace(0.1, 1, 10)
      x2 = jnp.linspace(0, 1, 10)
      x3 = (x1 - x1.mean()) / jnp.sqrt(x1.var() + 1e-5)
      assert jnp.allclose(ln(x1), ln(x2), atol=1e-4)
      assert jnp.allclose(ln(x1), x3, atol=1e-4)
  
imports: import warnings
  from typing import Union
  import equinox
  import jax
  import jax.nn
  import jax.numpy
  import jax.random
  import pytest
label_desc: Use image node_id 27 for calling a global function with example usage: test_layer_norm(getkey) without return types