def METHOD_NAME(
    self,
    early_termination_name: Optional[EarlyTerminationPolicyType],
    sampling_algorithm_name: SamplingAlgorithmType = SamplingAlgorithmType.GRID,
) -> NlpSweepSettings:
    early_termination_policy = None
    if early_termination_name == EarlyTerminationPolicyType.BANDIT:
        early_termination_policy = BanditPolicy(evaluation_interval=10, slack_factor=0.2)
    elif early_termination_name == EarlyTerminationPolicyType.MEDIAN_STOPPING:
        early_termination_policy = MedianStoppingPolicy(delay_evaluation=5, evaluation_interval=1)
    elif early_termination_name == EarlyTerminationPolicyType.TRUNCATION_SELECTION:
        early_termination_policy = TruncationSelectionPolicy(
            evaluation_interval=1, truncation_percentage=20, delay_evaluation=5
        )
    return NlpSweepSettings(early_termination=early_termination_policy, sampling_algorithm=sampling_algorithm_name)