def METHOD_NAME(self, ignore_filtering_by_available_teams=False):
    is_filters_request = self.request.query_params.get("filters", "false") == "true"
    queryset = EscalationChain.objects.filter(
        organization=self.request.auth.organization,
    )
    if not ignore_filtering_by_available_teams:
        queryset = queryset.filter(*self.available_teams_lookup_args).distinct()
    if is_filters_request:
        # Do not annotate num_integrations and num_routes for filters request,
        # only fetch public_primary_key and name fields needed by FilterEscalationChainSerializer
        return queryset.only("public_primary_key", "name")
    queryset = queryset.annotate(
        num_integrations=Count(
            "channel_filters__alert_receive_channel",
            distinct=True,
            filter=Q(channel_filters__alert_receive_channel__deleted_at__isnull=True),
        )
    ).annotate(
        num_routes=Count(
            "channel_filters",
            distinct=True,
            filter=Q(channel_filters__alert_receive_channel__deleted_at__isnull=True),
        )
    )
    return queryset