class Utils {
    static Duration parseDuration(String value) {<FILL_FUNCTION_BODY>}
}

        value = value.trim();
        if (value.isEmpty()) {
            return null;
        }

        try {
            return Duration.parse(value);
        } catch (DateTimeParseException e) {
            throw new IllegalArgumentException(e);
        }
    
<no_super_class>