docs: def _get_build_kwargs(self, obj, pk_set=None, action=None, update_fields=None, reverse=None, **kwargs):
          """Prepare arguments for rebuilding indices."""
          if action is None:
              # Check filter before rebuilding index.
              if not self._filter([obj], update_fields=update_fields):
                  return
  
              queryset = getattr(obj, self.accessor).all()
  
              # Special handling for relations to self.
              if self.field.rel.model == self.field.rel.related_model:
                  queryset = queryset.union(getattr(obj, self.field.rel.get_accessor_name()).all())
  
              return {'queryset': queryset}
          else:
              # Update to relation itself, only update the object in question.
              if self.field.rel.model == self.field.rel.related_model:
                  # Special case, self-reference, update both ends of the relation.
                  pks = set()
                  if self._filter(self.model.objects.filter(pk__in=pk_set)):
                      pks.add(obj.pk)
  
                  if self._filter(self.model.objects.filter(pk__in=[obj.pk])):
                      pks.update(pk_set)
  
                  return {'queryset': self.index.object_type.objects.filter(pk__in=pks)}
              elif isinstance(obj, self.model):
                  # Need to switch the role of object and pk_set.
                  result = {'queryset': self.index.object_type.objects.filter(pk__in=pk_set)}
                  pk_set = {obj.pk}
              else:
                  result = {'obj': obj}
  
              if action != 'post_clear':
                  # Check filter before rebuilding index.
                  if not self._filter(self.model.objects.filter(pk__in=pk_set)):
                      return
  
              return result