src/transformers/models/switch_transformers/modeling_switch_transformers.py/SwitchTransformersForConditionalGeneration/_unpack_router_logits
class SwitchTransformersForConditionalGeneration:    def _unpack_router_logits(self, router_outputs):
        total_router_logits = []
        total_expert_indexes = []
        for router_output in router_outputs:
            if router_output[0] is not None:
                router_logits, expert_indexes = router_output
                total_router_logits.append(router_logits)
                total_expert_indexes.append(expert_indexes)
        return torch.cat(total_router_logits, dim=1), torch.cat(total_expert_indexes, dim=1)