code: def localmin(x: np.ndarray, *, axis: int = 0) -> np.ndarray:
      """Find local minima in an array
  
      An element ``x[i]`` is considered a local minimum if the following
      conditions are met:
  
      - ``x[i] < x[i-1]``
      - ``x[i] <= x[i+1]``
  
      Note that the first condition is strict, and that the first element
      ``x[0]`` will never be considered as a local minimum.
  
      Examples
      --------
      >>> x = np.array([1, 0, 1, 2, -1, 0, -2, 1])
      >>> librosa.util.localmin(x)
      array([False,  True, False, False,  True, False,  True, False])
  
      >>> # Two-dimensional example
      >>> x = np.array([[1,0,1], [2, -1, 0], [2, 1, 3]])
      >>> librosa.util.localmin(x, axis=0)
      array([[False, False, False],
             [False,  True,  True],
             [False, False, False]])
  
      >>> librosa.util.localmin(x, axis=1)
      array([[False,  True, False],
             [False,  True, False],
             [False,  True, False]])
  
      Parameters
      ----------
      x : np.ndarray [shape=(d1,d2,...)]
          input vector or array
      axis : int
          axis along which to compute local minimality
  
      Returns
      -------
      m : np.ndarray [shape=x.shape, dtype=bool]
          indicator array of local minimality along ``axis``
  
      See Also
      --------
      localmax
      """
      # Rotate the target axis to the end
      xi = x.swapaxes(-1, axis)
  
      # Allocate the output array and rotate target axis
      lmin = np.empty_like(x, dtype=bool)
      lmini = lmin.swapaxes(-1, axis)
  
      # Call the vectorized stencil
      _localmin(xi, lmini)
  
      # Handle the edge condition not covered by the stencil
      lmini[..., -1] = xi[..., -1] < xi[..., -2]
  
      return lmin
  
imports: from __future__ import annotations
  import scipy.ndimage
  import scipy.sparse
  import numpy
  import numba
  from numpy.lib.stride_tricks import as_strided
  from .._cache import cache
  from .exceptions import ParameterError
  from .deprecation import Deprecated
  from numpy.typing import ArrayLike, DTypeLike
  from typing import Any, Callable, Iterable, List, Dict, Optional, Sequence, Tuple, TypeVar, Union, overload
  from typing_extensions import Literal
  from .._typing import _SequenceLike, _FloatLike_co, _ComplexLike_co
label_desc: Use image node_id 19 for calling a global function with example usage: localmin(x) and returns: lmin