public function setGenderedDataByPromoterType(Collection $applicantsByPromoterType, string $locale, ExportBaPublicReportService $exportBaPublicReportService): Collection 	{ 		// Get gender question 		$genderQuestion = $this->ppiSurvey->demographicQuestions->where('code', 'ppi-gender')->first() ?? abort(404, (string) __('exceptions.ppi-gender-question-missing'));  		// Prepare gendered collection 		$genderedDataByPromoterType = collect();  		// Loop through available gender options (Male, Female, Other) 		foreach ($genderQuestion->getTranslation('available_answers', $locale) as $index => $answer) { 			// Get applicants that match the promoter ids and gendered question answer based on current loop iteration (current looped gender) 			$genderApplicants = Applicant::whereHas('parent', function ($query) use ($index, $genderQuestion) { 				$query 				->whereHas('answers', function ($query) use ($index, $genderQuestion) { 					$query->where('question_id', $genderQuestion->id) 						->where('answer_value', $index + 1); 				}); 			}) 			->whereIn('id', $applicantsByPromoterType->pluck('id')->all()) 			->get();  			// Don't store data if less than 5 applicants were found 			if ($genderApplicants->count() < 5) { 				continue; 			}  			// Store a new key-value pair in the form of gender question answer, as a key, and BaPublicDTO representing the needed data 			$genderedDataByPromoterType->put( 				$answer, 				new BaPublicDTO( 					$exportBaPublicReportService->getQuestionDataForPpiApplicants( 						$this->ppiSurvey->demographicQuestions->where('code', 'ppi-age')->first(), 						$genderApplicants 					), 					collect(), 					$exportBaPublicReportService->getQuestionDataForPpiApplicants( 						$this->ppiSurvey->demographicQuestions->where('code', 'ppi-working-status')->first(), 						$genderApplicants 					), 					$exportBaPublicReportService->getQuestionDataForPpiApplicants( 						$this->ppiSurvey->demographicQuestions->where('code', 'ppi-qualifications')->first(), 						$genderApplicants 					), 					$exportBaPublicReportService->getQuestionDataForPpiApplicants( 						$this->ppiSurvey->demographicQuestions->where('code', 'ppi-region')->first(), 						$genderApplicants 					), 				) 			); 		}  		return $genderedDataByPromoterType; 	}