code: def ricker_matrix(width, resolution, n_components):
      """Dictionary of Ricker (Mexican hat) wavelets"""
      centers = np.linspace(0, resolution - 1, n_components)
      D = np.empty((n_components, resolution))
      for i, center in enumerate(centers):
          D[i] = ricker_function(resolution, center, width)
      D /= np.sqrt(np.sum(D**2, axis=1))[:, np.newaxis]
      return D
  
imports: import matplotlib.pyplot
  import numpy
  from sklearn.decomposition import SparseCoder
label_desc: Use image node_id 2 for calling a global function with example usage: ricker_matrix(width, resolution, n_components) and returns: D