def test_create_federated_eval_fns_skips_rounds(self, rounds_per_eval,
                                                  round_num):
    """Test that create_federated_eval_fns skips the appropriate rounds."""

    part_train_eval_fn, part_val_fn, unpart_fn, _ = trainer_utils.create_federated_eval_fns(
        tff_model_builder=tff_model_builder,
        metrics_builder=metrics_builder,
        part_train_eval_cd=create_federated_cd(),
        part_val_cd=create_federated_cd(),
        unpart_cd=create_federated_cd(),
        test_cd=create_federated_cd(),
        stat_fns=eval_metric_distribution.ALL_STAT_FNS,
        rounds_per_eval=rounds_per_eval,
        part_clients_per_eval=2,
        unpart_clients_per_eval=2,
        test_clients_for_eval=3,
        resample_eval_clients=False,
        eval_clients_random_seed=1)
    keras_model = keras_model_builder_with_zeros()
    model_weights = tff.learning.ModelWeights.from_model(keras_model)
    server_state = tff.learning.framework.ServerState(model_weights, [], [], [])

    # Federated validation fn requires a positional arg round_num.
    for eval_fn in (part_train_eval_fn, part_val_fn, unpart_fn):
      metrics_dict = eval_fn(server_state, round_num)
      self.assertEmpty(metrics_dict.keys())