def get_crosslink_committees_at_slot(state: BeaconState, slot: Slot, config: Eth2Config) -> Tuple[(Tuple[(Tuple[(ValidatorIndex, ...)], Shard)], ...)]:
    epoch = compute_epoch_of_slot(slot, config.SLOTS_PER_EPOCH)
    active_validators = get_active_validator_indices(state.validators, epoch)
    committees_per_slot = (get_committee_count(len(active_validators), config.SHARD_COUNT, config.SLOTS_PER_EPOCH, config.TARGET_COMMITTEE_SIZE) // config.SLOTS_PER_EPOCH)
    results = []
    offset = (committees_per_slot * (slot % config.SLOTS_PER_EPOCH))
    slot_start_shard = Shard(((get_start_shard(state, epoch, CommitteeConfig(config)) + offset) % config.SHARD_COUNT))
    for i in range(committees_per_slot):
        shard = ((slot_start_shard + i) % config.SHARD_COUNT)
        committee = get_crosslink_committee(state, epoch, shard, CommitteeConfig(config))
        results.append((committee, Shard(shard)))
    return tuple(results)
def get_crosslink_committees_at_slot(state: BeaconState, slot: Slot, config: Eth2Config) -> Tuple[(Tuple[(Tuple[(ValidatorIndex, ...)], Shard)], ...)]:
    epoch = compute_epoch_of_slot(slot, config.SLOTS_PER_EPOCH)
    active_validators = get_active_validator_indices(state.validators, epoch)
    committees_per_slot = (get_committee_count(len(active_validators), config.SHARD_COUNT, config.SLOTS_PER_EPOCH, config.TARGET_COMMITTEE_SIZE) // config.SLOTS_PER_EPOCH)
    results = []
    offset = (committees_per_slot * (slot % config.SLOTS_PER_EPOCH))
    slot_start_shard = Shard(((get_start_shard(state, epoch, CommitteeConfig(config)) + offset) % config.SHARD_COUNT))
    for i in range(committees_per_slot):
        shard = ((slot_start_shard + i) % config.SHARD_COUNT)
        committee = get_crosslink_committee(state, epoch, shard, CommitteeConfig(config))
        results.append((committee, Shard(shard)))
    return tuple(results)