code: def _canonicalize_axes(axes, rank):
      rank = _maybe_static(rank)
  
      if isinstance(rank, tf.Tensor):
          canonicalizer = lambda axis: cond(
              axis < 0, lambda: axis + rank, lambda: axis
          )
      else:
          canonicalizer = lambda axis: axis + rank if axis < 0 else axis
  
      return [canonicalizer(axis) for axis in axes]
  
imports: import funcsigs
  import numpy
  import tensorflow.compat.v2
  from trax.tf_numpy.numpy_impl import arrays
  from trax.tf_numpy.numpy_impl import dtypes
label_desc: Use image node_id 2 for calling a global function with example usage: _canonicalize_axes(axes, rank) and returns: unknown