def _validate_secret(value: str) ->str:
    """Ensure that the value is not CHANGEME and convert it to a string.

    This function is used to ensure that secret values in the config have been set by the user to
    something other than the default of CHANGEME.

    Args:
        value: The value to be validated.
    Returns:
        The value.
    Raises:
        ValueError: If value is "CHANGEME".
    """
    if value == 'CHANGEME':
        raise ValueError('This setting must be changed from its default value.'
            )
    return str(value)
