code: def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
      output = []
      # heapq.heapify(matrix)
      for mat in matrix:
          for val in mat:
              output.append(val)
      output[:] = sorted(output)
      return output[k - 1]
  
label_desc: Use image node_id 1 for calling the Solution obj's underlying member method code with example usage: obj.kthSmallest(matrix, k) and returns: output