code: def hash_on_axis(ar, axis, n_dest):
      ar = np.asarray(ar)
      # cannot be scalar
      assert ar.ndim > 0
      axis = validate_axis(ar.ndim, axis)
  
      if n_dest == 1:
          return np.zeros(ar.shape[axis], dtype=np.uint32)
  
      if ar.ndim > 2:
          ret = np.empty(ar.shape[axis], dtype=np.uint32)
  
          def _hash_to_dest(data):
              i = data[0]
              idx = (slice(None),) * axis + (i,)
              ret[i] = hash_from_buffer(memoryview(ar[idx])) % n_dest
  
          np.apply_along_axis(
              _hash_to_dest, 0, np.arange(ar.shape[axis])[np.newaxis, :]
          )
          return ret
      else:
  
          def _hash_to_dest(data):
              return hash_from_buffer(memoryview(data)) % n_dest
  
          if ar.ndim == 1:
              ar = ar.reshape(ar.size, 1)
          return np.apply_along_axis(_hash_to_dest, 1 - axis, ar)
  
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 33 for calling a global function with example usage: hash_on_axis(ar, axis, n_dest) and returns: np, ret, np, unknown