code: def ellipse(width, height, dtype=np.uint8, *, decomposition=None):
      """Generates a flat, ellipse-shaped footprint.
  
      Every pixel along the perimeter of ellipse satisfies
      the equation ``(x/width+1)**2 + (y/height+1)**2 = 1``.
  
      Parameters
      ----------
      width : int
          The width of the ellipse-shaped footprint.
      height : int
          The height of the ellipse-shaped footprint.
  
      Other Parameters
      ----------------
      dtype : data-type, optional
          The data type of the footprint.
      decomposition : {None, 'crosses'}, optional
          If None, a single array is returned. For 'sequence', a tuple of smaller
          footprints is returned. Applying this series of smaller footprints will
          given an identical result to a single, larger footprint, but with
          better computational performance. See Notes for more details.
  
      Returns
      -------
      footprint : ndarray
          The footprint where elements of the neighborhood are 1 and 0 otherwise.
          The footprint will have shape ``(2 * height + 1, 2 * width + 1)``.
  
      Notes
      -----
      When `decomposition` is not None, each element of the `footprint`
      tuple is a 2-tuple of the form ``(ndarray, num_iter)`` that specifies a
      footprint array and the number of iterations it is to be applied.
  
      The ellipse produced by the ``decomposition='crosses'`` is often but not
      always  identical to that with ``decomposition=None``. The method is based
      on an adaption of algorithm 1 given in [1]_.
  
      References
      ----------
      .. [1] Li, D. and Ritter, G.X. Decomposition of Separable and Symmetric
             Convex Templates. Proc. SPIE 1350, Image Algebra and Morphological
             Image Processing, (1 November 1990).
             :DOI:`10.1117/12.23608`
  
      Examples
      --------
      >>> from skimage.morphology import footprints
      >>> footprints.ellipse(5, 3)
      array([[0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0],
             [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
             [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
             [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
             [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
             [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
             [0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0]], dtype=uint8)
  
      """
      if decomposition is None:
          footprint = np.zeros(
              (2 * height + 1, 2 * width + 1), dtype=dtype
          )
          rows, cols = draw.ellipse(
              height, width, height + 1, width + 1
          )
          footprint[rows, cols] = 1
          return footprint
      elif decomposition == "crosses":
          fp = ellipse(width, height, dtype, decomposition=None)
          sequence = _cross_decomposition(fp)
      return sequence
  
imports: import os
  from collections.abc import Sequence
  from numbers import Integral
  import numpy
  from ..None import draw
  from skimage import morphology
label_desc: Use image node_id 13 for calling a global function with example usage: ellipse(width, height, dtype) and returns: sequence, footprint