code: def magnitude_after_pruning_rows(matrix, rate=0.5):
      magnitude = 0.0
      cols = matrix.shape[1]
      for r in range(matrix.shape[0]):
          rowVals = matrix[r]
          rowVals = np.sort(np.abs(rowVals))
          magnitude += np.sum(rowVals[int(cols * rate) :])
  
      return magnitude
  
imports: import numpy
  import time
  import subprocess
  import math
label_desc: Use image node_id 7 for calling a global function with example usage: magnitude_after_pruning_rows(matrix, rate) and returns: magnitude