code: def merit_calculation(X, y):
      """
      This function calculates the merit of X given class labels y, where
      merits = (k * rcf)/sqrt(k+k*(k-1)*rff)
      rcf = (1/k)*sum(su(fi,y)) for all fi in X
      rff = (1/(k*(k-1)))*sum(su(fi,fj)) for all fi and fj in X
  
      Input
      ----------
      X: {numpy array}, shape (n_samples, n_features)
          input data
      y: {numpy array}, shape (n_samples,)
          input class labels
  
      Output
      ----------
      merits: {float}
          merit of a feature subset X
      """
  
      n_samples, n_features = X.shape
      rff = 0
      rcf = 0
      for i in range(n_features):
          fi = X[:, i]
          rcf += su_calculation(fi, y)
          for j in range(n_features):
              if j > i:
                  fj = X[:, j]
                  rff += su_calculation(fi, fj)
      rff *= 2
      merits = rcf / np.sqrt(n_features + rff)
      return merits
  
label_desc: Use image node_id 1 for calling a global function with example usage: merit_calculation(X, y) and returns: merits