docs: def find_uncommitted_filefields(sender, instance, **kwargs):
      """
      A pre_save signal handler which attaches an attribute to the model instance
      containing all uncommitted ``FileField``s, which can then be used by the
      :func:`signal_committed_filefields` post_save handler.
      """
      uncommitted = instance._uncommitted_filefields = []
  
      fields = sender._meta.fields
      if kwargs.get('update_fields', None):
          update_fields = set(kwargs['update_fields'])
          fields = update_fields.intersection(fields)
      for field in fields:
          if isinstance(field, FileField):
              fieldfile = getattr(instance, field.name)
              if fieldfile and not fieldfile._committed:
                  uncommitted.append(field.name)