public function getFilteredDemographicDataCollection(?Question $demographicQuestion, Collection $applicants, Collection $questions, ExportBaPublicReportService $exportBaPublicReportService, array $questionIds, string $locale): Collection 	{ 		$demographicDataFilteredCollection = collect();  		if (!$demographicQuestion) { 			return $demographicDataFilteredCollection; 		}  		foreach ($demographicQuestion->getTranslation('available_answers', $locale) as $index => $answer) { 			// $filteredApplicants = Applicant::whereHas('parent', function ($query) use ($index, $demographicQuestion) { 			// 	$query 			// 	->whereHas('answers', function ($query) use ($index, $demographicQuestion) { 			// 		$query->where('question_id', $demographicQuestion->id) 			// 			->where('answer_value', $index + 1); 			// 	}); 			// }) 			// ->whereIn('id', $applicants->pluck('id')->all()) 			// ->get();  			$filteredApplicants = $applicants 			->filter(function ($item, $key) use ($index, $demographicQuestion) { 				return $item->parent->answers 				->where('question_id', $demographicQuestion->id) 				->where('answer_value', $index + 1) 				->count(); 			}) 			->whereIn('id', $applicants->pluck('id')->all());  			if ($filteredApplicants->isEmpty()) { 				continue; 			}  			$filteredQuestionData = $exportBaPublicReportService->getQuestionDataForGradingBasedOnDemography($questions->whereIn('id', $questionIds), $filteredApplicants);  			$demographicDataFilteredCollection->put($answer, $filteredQuestionData); 		}  		return $demographicDataFilteredCollection; 	}