code: def _normalize_axes(
      axes: Tuple[int, ...], ndim: int
  ) -> Tuple[int, ...]:
      # A tuple by convention. len(axes_tuple) then also gives the rank efficiently.
      return tuple(sorted(ax if ax >= 0 else ndim + ax for ax in axes))
  
imports: import dataclasses
  from typing import Any, Callable, Iterable, List, Optional, Sequence, Tuple, Union
  import jax
  import jax.numpy
  import numpy
  from jax import eval_shape, lax
  from jax.core import ShapedArray
  from flax.core import meta
  from flax.linen import initializers
  from flax.linen.dtypes import promote_dtype
  from flax.linen.module import Module, compact
label_desc: Use image node_id 1 for calling a global function with example usage: _normalize_axes(axes, ndim) and returns: tuple