code: def export_action_form_factory(formats):
      
      class _ExportActionForm(ActionForm):
          """
          Action form with export format ChoiceField.
          """
          file_format = forms.ChoiceField(
              label=_('Format'), choices=formats, required=False)
      _ExportActionForm.__name__ = str('ExportActionForm')
  
      return _ExportActionForm
docs: Returns an ActionForm subclass containing a ChoiceField populated with
      the given formats.