<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def form_lines_valid(self, form):
 """Handle a valid LineFormSet."""

        handled = 0
        for inner_form in form:
            if not inner_form.cleaned_data.get(formsets.DELETION_FIELD_NAME):
                handled += 1
                self.handle_inner_form(inner_form)

        self.log_and_notify_lines(handled)
        return http.HttpResponseRedirect(self.get_success_url())