docs: def score_n4(matrix, matrix_size):
      """\
      Implements the penalty score feature 4.
  
      ISO/IEC 18004:2015(E) -- 7.8.3 Evaluation of data masking results - Table 11 (page 54)
  
      ===========================================   ====================================   ======
      Feature                                       Evaluation condition                   Points
      ===========================================   ====================================   ======
      Proportion of dark modules in entire symbol   50 × (5 × k)% to 50 × (5 × (k + 1))%   N4 × k
      ===========================================   ====================================   ======
  
      N4 = 10
  
      :param matrix: The matrix to evaluate
      :param matrix_size: The width (or height) of the matrix.
      :return int: The penalty score (feature 4) of the matrix.
      """
      dark_modules = sum(map(sum, matrix))
      total_modules = matrix_size ** 2
      k = int(abs(dark_modules * 2 - total_modules) * 10 // total_modules)
      return 10 * k