code: def _absolute_dims(rank: int, dims: Iterable[int]):
      return tuple([rank + dim if dim < 0 else dim for dim in dims])
  
imports: import functools
  from typing import Optional, Tuple, Union, Callable, Any, Sequence, List, Iterable
  import flax.linen
  import jax
  from jax import lax
  import jax.numpy
  import numpy
label_desc: Use image node_id 1 for calling a global function with example usage: _absolute_dims(rank, dims) and returns: tuple