public function calculateExtraQestionsPerPage(Collection $extra_questions_data, int $max_rows_per_page): Collection 	{ 		$question_data = []; 		$extra_rows = 0;  		$extra_questions_data->each(function (array $question, int $question_key) use (&$question_data, &$max_rows_per_page, &$extra_rows) { 			if ($question_key == 0) { // check only for first page (is there empty rows/extra  rows) 				$extra_rows = ($question['question_answer_rows'] > $max_rows_per_page) ? $question['question_answer_rows'] - $max_rows_per_page : $max_rows_per_page - $question['question_answer_rows']; 			}  			switch ($question['type']) { 				case QuestionType::Text->value: 					$standard_question_data = $this->calculateRowsPerPageForStandardQuestion($question, $max_rows_per_page, $extra_rows, $question_key);  					array_push($question_data, $standard_question_data);  					break;  				case QuestionType::Textarea->value: 					$textual_question_data = $this->calculateRowsPerPageForTextareaQuestion($question, $max_rows_per_page, $extra_rows);  					$question_data = array_merge($question_data, $textual_question_data['data']); 					$extra_rows = $textual_question_data['extra_rows'];  					break;  				default:  					$question_data = array_merge($question_data, [$question]); // standard question type  					break; 			} 		});  		return collect($question_data); 	}