def METHOD_NAME(
    self, read_timeout: float = 120.0, delay_factor: Optional[float] = None
) -> str:
    """
    Confirm the candidate configuration.
    Raise an error and return the failure if the confirm fails.
    delay_factor: Deprecated in Netmiko 4.x. Will be eliminated in Netmiko 5.
    """
    if delay_factor is not None:
        warnings.warn(DELAY_FACTOR_DEPR_SIMPLE_MSG, DeprecationWarning)
    error_marker = "Nothing to confirm in configuration"
    command_string = "confirm"
    if self.check_config_mode():
        self.exit_config_mode()
    output = self._send_command_str(
        command_string=command_string, read_timeout=read_timeout
    )
    if error_marker in output:
        raise ValueError(
            "Confirm failed with following errors:\n\n{}".format(output)
        )
    return output