code: def get_border_data(data, border_size):
      """Return the data at the border of an array."""
      return np.concatenate(
          [
              data[:border_size, :, :].ravel(),
              data[-border_size:, :, :].ravel(),
              data[:, :border_size, :].ravel(),
              data[:, -border_size:, :].ravel(),
              data[:, :, :border_size].ravel(),
              data[:, :, -border_size:].ravel(),
          ]
      )
  
imports: import numpy
  from scipy.ndimage import label, maximum_filter
label_desc: Use image node_id 2 for calling a global function with example usage: get_border_data(data, border_size) and returns: np