<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_attachment_formset(self, formset_class):
 """ Returns an instance of the attachment formset to be used in the view. """

        if (
            self.request.forum_permission_handler.can_attach_files(
                self.get_forum(), self.request.user,
            )
        ):
            return formset_class(**self.get_attachment_formset_kwargs())