code: def stack(*imgs, **kwargs):
      """Combine images together, overlaying later images onto earlier ones.
  
      Parameters
      ----------
      imgs : iterable of Image
          The images to combine.
      how : str, optional
          The compositing operator to combine pixels. Default is `'over'`.
      """
      from datashader.composite import composite_op_lookup
  
      if not imgs:
          raise ValueError("No images passed in")
      shapes = []
      for i in imgs:
          if not isinstance(i, Image):
              raise TypeError(
                  "Expected `Image`, got: `{0}`".format(type(i))
              )
          elif not shapes:
              shapes.append(i.shape)
          elif shapes and i.shape not in shapes:
              raise ValueError(
                  "The stacked images must have the same shape."
              )
  
      name = kwargs.get("name", None)
      op = composite_op_lookup[kwargs.get("how", "over")]
      if len(imgs) == 1:
          return imgs[0]
      imgs = xr.align(*imgs, copy=False, join="outer")
      with np.errstate(divide="ignore", invalid="ignore"):
          out = tz.reduce(tz.flip(op), [i.data for i in imgs])
      return Image(
          out, coords=imgs[0].coords, dims=imgs[0].dims, name=name
      )
  
imports: from __future__ import annotations
  from collections.abc import Iterator
  from io import BytesIO
  import warnings
  import numpy
  import numba
  import toolz
  import xarray
  import dask.array
  from PIL.Image import fromarray
  from datashader.colors import rgb, Sets1to3
  from datashader.utils import nansum_missing, ngjit
label_desc: Use image node_id 1 for calling a global function with example usage: stack() and returns: Image, imgs