code: def coerce_boundary(ndim, boundary):
      default = "none"
      if boundary is None:
          boundary = default
      if not isinstance(boundary, (tuple, dict)):
          boundary = (boundary,) * ndim
      if isinstance(boundary, tuple):
          boundary = dict(zip(range(ndim), boundary))
      if isinstance(boundary, dict):
          boundary = {
              ax: boundary.get(ax, default) for ax in range(ndim)
          }
      return boundary
  
imports: from __future__ import annotations
  import warnings
  from numbers import Integral, Number
  import numpy
  from tlz import concat, get, partial
  from tlz.curried import map
  from dask.array import chunk
  from dask.array.core import Array, concatenate, map_blocks, unify_chunks
  from dask.array.creation import empty_like, full_like
  from dask.array.numpy_compat import normalize_axis_tuple
  from dask.base import tokenize
  from dask.highlevelgraph import HighLevelGraph
  from dask.layers import ArrayOverlapLayer
  from dask.utils import derived_from
label_desc: Use image node_id 18 for calling a global function with example usage: coerce_boundary(ndim, boundary) and returns: boundary