human
I wrote the below code

    collector = PolymorphicAwareNestedObjects(using=using)
    collector.collect(objs)
    perms_needed = set()
    def format_callback(obj):
        has_admin = (obj.__class__ in admin_site._registry)
        opts = obj._meta
        no_edit_link = (u'%s:    %s' % (capfirst(opts.verbose_name), force_text(obj)))
        if has_admin:
            try:
                admin_url = reverse((u'%s:%s_%s_change' % (admin_site.name, opts.app_label, opts.model_name)), None, (quote(obj._get_pk_val()),))
            except NoReverseMatch:
                return no_edit_link
            p = (u'%s.%s' % (opts.app_label, get_permission_codename(u'delete', opts)))
            if (not user.has_perm(p)):
                perms_needed.add(opts.verbose_name)
            return format_html(u'{}:    <a    href="{}">{}</a>', capfirst(opts.verbose_name), admin_url, obj)
        else:
            return no_edit_link
    to_delete = collector.nested(format_callback)
    protected = [format_callback(obj) for obj in collector.protected]
    model_count = {model._meta.verbose_name_plural: len(objs) for (model, objs) in collector.model_objs.items()}
    return (to_delete, model_count, perms_needed, protected)

What's a good function header?
assistant
#Here's a good function header.

def get_deleted_objects(objs, opts, user, admin_site, using):