public function calculateClientSurveyFinalGrade(ClientSurvey $client_survey, ?string $locale = null): array 	{ 		// cached for 1 minute 		return cache()->remember('benchmark_client_survey_categories_with_avg_score_' . $client_survey->id, 60, function () use ($client_survey, $locale) { 			$answers = DB::select( 				' 				select id, answer_value, (select category_id from questions where answers.question_id = questions.id and questions.type = 4) as question_category_id 				from answers 				where client_survey_id = ? and applicant_id in (select id from applicants where active = 1 and filled = 1 and draft = 0)', 				[$client_survey->id] 			);  			$answers = collect($answers);  			$categories_with_avg_score = [];  			foreach ($client_survey->survey->categories as $category) { 				$category_answers = $answers->where('question_category_id', $category->getKey());  				$category_score = number_format($category_answers->avg(function ($item) { 					return $item->answer_value; 				}), 10, '.', '');  				array_push($categories_with_avg_score, [ 					'name' => $category->getTranslation('name', $locale ?? DomainLanguages::getDefaultLanguage()), 					'score' => $category_score, 					'image_url' => $category->storage()->getFirstFile('image')?->getUrl(), 				]); 			}  			return $categories_with_avg_score; 		}); 	}