code: def feature_ranking(W):
      """
      This function ranks features according to the feature weights matrix W
  
      Input:
      -----
      W: {numpy array}, shape (n_features, n_classes)
          feature weights matrix
  
      Output:
      ------
      idx: {numpy array}, shape {n_features,}
          feature index ranked in descending order by feature importance
      """
      T = (W * W).sum(1)
      idx = np.argsort(T, 0)
      return idx[::-1]
  
file_path: scikit-feature/skfeature/utility/sparse_learning.py
imports: import numpy
  from numpy import linalg
label_desc: Use image node_id 1 for calling a global function with example usage: feature_ranking(W) and returns: idx