def METHOD_NAME(
    self,
    early_termination_name: Optional[EarlyTerminationPolicyType],
    sampling_algorithm_name: SamplingAlgorithmType,
) -> None:
    image_sweep_settings_obj = self._get_entity_obj(early_termination_name, sampling_algorithm_name)
    # serialize and deserialize to ensure equality
    image_sweep_settings_rest = ImageSweepSettings._to_rest_object(image_sweep_settings_obj)
    image_sweep_settings_obj_2 = ImageSweepSettings._from_rest_object(image_sweep_settings_rest)
    assert (
        image_sweep_settings_obj == image_sweep_settings_obj_2
    ), f"actual: {image_sweep_settings_obj}, expected: {image_sweep_settings_obj_2}"