code: def unstructured_prune(matrix, sparsity):
      shp = matrix.shape
      matrix = matrix.flatten()
      ix = np.argsort(matrix)
      ix = ix[: int(len(ix) * sparsity)]
      matrix[ix] = 0.0
      matrix = np.reshape(matrix, shp)
      return matrix
  
imports: import numpy
  import time
  import subprocess
  import math
label_desc: Use image node_id 4 for calling a global function with example usage: unstructured_prune(matrix, sparsity) and returns: matrix