code: def laplacian_2D(array, alpha=0.2):
      """
      filtered = laplacian_2D(array, alpha = 0.2)
  
      2D Laplacian filter.
  
      Parameters
      ----------
      array : ndarray
          input 2D array. If the array is an integer array, it will be converted
          to a double array.
      alpha : scalar or sequence of scalars
          controls the shape of Laplacian operator. Must be 0-1. A larger values
          makes the operator empahsize the diagonal direction.
  
      Returns
      -------
      filtered : ndarray
          Filtered version of `array`
      """
      array = np.array(array, dtype=float)
      if array.ndim != 2:
          raise ValueError(
              "mahotas.laplacian_2D: Only available for 2-dimensional arrays"
          )
  
      alpha = max(0, min(alpha, 1))
      ver_hor_weight = (1.0 - alpha) / (alpha + 1.0)
      diag_weight = alpha / (alpha + 1.0)
      center = -4.0 / (alpha + 1.0)
      weights = np.array(
          [
              [diag_weight, ver_hor_weight, diag_weight],
              [ver_hor_weight, center, ver_hor_weight],
              [diag_weight, ver_hor_weight, diag_weight],
          ]
      )
  
      output = convolve(array, weights, mode="nearest")
      return output
  
imports: import numpy
  from .None import _convolve
  from .None import morph
  from .internal import _get_output, _normalize_sequence, _verify_is_floatingpoint_type, _as_floating_point_array
  from ._filters import mode2int, modes, _check_mode
label_desc: Use image node_id 19 for calling a global function with example usage: laplacian_2D(array, alpha) and returns: output