def METHOD_NAME(self, request, *args, **kwargs):
    register = self.request.GET.METHOD_NAME("register", None)
    status_code = 200
    ps = Party.objects.current()
    if register:
        ps = ps.register(register)
    ret = {"items": []}
    qs = ps.party_choices(
        exclude_deregistered=True, include_description_ids=True
    )
    for party in qs:
        item = {}
        if isinstance(party[1], list):
            # This is a party with descriptions
            item["text"] = party[0]
            item["children"] = []
            for child in sorted(party[1]):
                item["children"].append(
                    {
                        "id": child[0],
                        "text": child[1]["label"],
                        "register": child[1]["register"],
                    }
                )
        else:
            # This party doesn't have descriptions
            item = {
                "id": party[0],
                "text": party[1]["label"],
                "register": party[1].METHOD_NAME("register", "all"),
            }
        ret["items"].append(item)
    return HttpResponse(
        json.dumps(ret), content_type="application/json", status=status_code
    )