code: def sign_array(
      p_values: Union[List, np.ndarray], alpha: float = 0.05
  ) -> np.ndarray:
      """Significance array.
  
      Converts an array with p values to a significance array where
      0 is False (not significant), 1 is True (significant),
      and -1 is for diagonal elements.
  
      Parameters
      ----------
      p_values : Union[List, np.ndarray]
          Any object exposing the array interface and containing
          p values.
  
      alpha : float = 0.05
          Significance level. Default is 0.05.
  
      Returns
      -------
      result : numpy.ndarray
          Array where 0 is False (not significant), 1 is True (significant),
          and -1 is for diagonal elements.
  
      Examples
      --------
      >>> p_values = np.array([[ 1.        ,  0.00119517,  0.00278329],
                               [ 0.00119517,  1.        ,  0.18672227],
                               [ 0.00278329,  0.18672227,  1.        ]])
      >>> ph.sign_array(p_values)
      array([[1, 1, 1],
             [1, 1, 0],
             [1, 0, 1]])
      """
      p_values = np.array(p_values)
      p_values[p_values > alpha] = 0
      p_values[(p_values < alpha) & (p_values > 0)] = 1
      np.fill_diagonal(p_values, 1)
  
      return p_values
  
file_path: scikit-posthocs/scikit_posthocs/_plotting.py
imports: from typing import Union, List, Tuple, Dict, Set
  import numpy
  from matplotlib import colors
  from matplotlib.axes import SubplotBase
  from matplotlib.colorbar import ColorbarBase, Colorbar
  from matplotlib.colors import ListedColormap
  from matplotlib import pyplot
  from pandas import DataFrame, Series
  from seaborn import heatmap
label_desc: Use image node_id 1 for calling a global function with example usage: sign_array(p_values, alpha) and returns: p_values