code: def _stretch_im(arr, str_clip):
      """Stretch an image in numpy ndarray format using a specified clip value.
  
      Parameters
      ----------
      arr: numpy array
          N-dimensional array in rasterio band order (bands, rows, columns)
      str_clip: int
          The % of clip to apply to the stretch. Default = 2 (2 and 98)
  
      Returns
      ----------
      arr: numpy array with values stretched to the specified clip %
  
      """
      s_min = str_clip
      s_max = 100 - str_clip
      arr_rescaled = np.zeros_like(arr)
      for ii, band in enumerate(arr):
          lower, upper = np.nanpercentile(band, (s_min, s_max))
          arr_rescaled[ii] = exposure.rescale_intensity(
              band, in_range=(lower, upper)
          )
      return arr_rescaled.copy()
  
file_path: earthpy/earthpy/plot.py
imports: import numpy
  import numpy.ma
  import matplotlib.pyplot
  from matplotlib import patches
  from matplotlib.colors import ListedColormap
  from mpl_toolkits.axes_grid1 import make_axes_locatable
  from skimage import exposure
  import earthpy.spatial
label_desc: Use image node_id 4 for calling a global function with example usage: _stretch_im(arr, str_clip) and returns: arr_rescaled