def string_casting(value, str_func):
    """Helper function to handle string transformations."""
    return (
        value.set_casting(str_func)
        if isinstance(value, Lazy)
        else str_func(str(value))
    )
Helper function to handle string transformations.
dynaconf/utils/parse_conf.py