code: def normalize_axis_tuple(
      axis, ndim, argname=None, allow_duplicate=False
  ):
      """
      Normalizes an axis argument into a tuple of non-negative integer axes.
  
      This handles shorthands such as ``1`` and converts them to ``(1,)``,
      as well as performing the handling of negative indices covered by
      `normalize_axis_index`.
  
      By default, this forbids axes from being specified multiple times.
  
      Used internally by multi-axis-checking logic.
  
      Parameters
      ----------
      axis : int, iterable of int
          The un-normalized index or indices of the axis.
      ndim : int
          The number of dimensions of the array that `axis` should be normalized
          against.
      argname : str, optional
          A prefix to put before the error message, typically the name of the
          argument.
      allow_duplicate : bool, optional
          If False, the default, disallow an axis from being specified twice.
  
      Returns
      -------
      normalized_axes : tuple of int
          The normalized axis index, such that `0 <= normalized_axis < ndim`
  
      Raises
      ------
      AxisError
          If any axis provided is out of range
      ValueError
          If an axis is repeated
  
      See also
      --------
      normalize_axis_index : normalizing a single scalar axis
      """
      # Optimization to speed-up the most common cases.
      if type(axis) not in (tuple, list):
          try:
              axis = [operator.index(axis)]
          except TypeError:
              pass
      # Going via an iterator directly is slower than via list comprehension.
      axis = tuple([validate_axis(ndim, ax, argname) for ax in axis])
      if not allow_duplicate and len(set(axis)) != len(axis):
          if argname:
              raise ValueError(f"repeated axis in `{argname}` argument")
          else:
              raise ValueError("repeated axis")
      return axis
  
imports: import inspect
  import itertools
  import operator
  from collections import OrderedDict
  from collections.abc import Iterable
  from functools import lru_cache, reduce, wraps
  from math import ceil
  from numbers import Integral
  from typing import Dict, List, Union
  import numpy
  from ..core import ExecutableTuple, recursive_tile
  from ..utils import lazy_import
  from ..lib.mmh3 import hash_from_buffer
label_desc: Use image node_id 7 for calling a global function with example usage: normalize_axis_tuple(axis, ndim, argname, allow_duplicate) and returns: axis