code: def remove_staff_lines_2(thickness, img_with_staff):
      img = img_with_staff.copy()
      projected = []
      rows, cols = img.shape
      for i in range(rows):
          proj_sum = 0
          for j in range(cols):
              proj_sum += img[i][j] == 1
          projected.append([1] * proj_sum + [0] * (cols - proj_sum))
          if proj_sum <= row_percentage * cols:
              img[i, :] = 1
      closed = binary_opening(img, np.ones((3 * thickness, 1)))
      return closed
  
file_path: Mozart/src/staff.py
imports: from rle import *
  from commonfunctions import *
  from collections import Counter
label_desc: Use image node_id 4 for calling a global function with example usage: remove_staff_lines_2(thickness, img_with_staff) and returns: closed