public function getCategoriesAverageScore(Collection $categories, array $applicants_ids, string $locale): array 	{ 		$dataProvider = new DataProvider(new DatabaseRawDataFetcher); 		$categories_with_avg_score = [];  		$categories->each(function (Category $category) use (&$applicants_ids, &$locale, &$categories_with_avg_score, &$dataProvider): void { 			$categoryBasedAnswers = $dataProvider->fetchGeneralReportAnswers($category->questions->pluck('id')->all(), $applicants_ids);  			$totalAnswers = 0; 			$totalAnwersMaxPossible = 0;  			foreach ($categoryBasedAnswers as $answer) { 				$totalAnwersMaxPossible += $answer->answer_value_count; 				$totalAnswers += ($answer->answer_value_count * (int) $answer->value); 			}  			$totalCategoriesAverage = $totalAnwersMaxPossible == 0 ? 0 : round($totalAnswers / ($totalAnwersMaxPossible * 4), 3); 			$totalCategoriesAverageTurnedIntoScale4 = round(4 * $totalCategoriesAverage, 3);  			array_push($categories_with_avg_score, [ 				'name' => $category->getTranslation('name', $locale), 				'score' => $totalCategoriesAverageTurnedIntoScale4, 			]); 		});  		return $categories_with_avg_score; 	}