def METHOD_NAME(eval_interval: str,):
    # Configure the trainer
    mock_logger_destination = MagicMock()
    mock_logger_destination.log_metrics = MagicMock()
    model = SimpleModel(num_features=1, num_classes=2)
    compute_val_metrics = eval_interval != '0ep'
    train_subset_num_batches = 2
    eval_subset_num_batches = 2
    num_epochs = 2
    metrics_callback = MetricsCallback(compute_val_metrics=compute_val_metrics)
    dataset_kwargs = {
        'num_classes': 2,
        'shape': (1, 5, 5),
    }
    # Create the trainer
    trainer = Trainer(
        model=model,
        train_dataloader=DataLoader(
            RandomClassificationDataset(**dataset_kwargs),
            batch_size=16,
        ),
        eval_dataloader=DataLoader(
            RandomClassificationDataset(**dataset_kwargs),
            batch_size=8,
        ),
        max_duration=num_epochs,
        train_subset_num_batches=train_subset_num_batches,
        eval_subset_num_batches=eval_subset_num_batches,
        loggers=[mock_logger_destination],
        callbacks=[metrics_callback],
        eval_interval=eval_interval,
    )
    # Train the model
    trainer.fit()
    if not compute_val_metrics:
        return
    # Validate the metrics
    assert trainer.state.train_metrics['MulticlassAccuracy'].compute() != 0.0
    if compute_val_metrics:
        assert trainer.state.eval_metrics['eval']['MulticlassAccuracy'].compute() != 0.0
    else:
        assert 'eval' not in trainer.state.eval_metrics
    num_step_and_index_calls = 2  # global_step and batch_idx calls
    num_loss_calls_per_epoch = 1
    # Validate that the logger was called the correct number of times for metric calls
    num_expected_calls = 0
    # Every epoch is logged.
    num_expected_calls += num_epochs
    num_expected_calls += num_epochs * train_subset_num_batches * num_step_and_index_calls
    num_expected_calls += 1  # timestamp call at end of fit
    num_expected_calls += num_epochs * train_subset_num_batches * num_loss_calls_per_epoch
    # Computed once per batch and again at epoch end
    num_expected_calls += (train_subset_num_batches + 1) * num_epochs
    # Computed at eval end
    if compute_val_metrics:
        num_evals = 0
        if eval_interval == '1ba':
            num_evals += train_subset_num_batches * num_epochs
        if eval_interval == '1ep':
            num_evals += num_epochs
        num_expected_calls += num_evals
    num_actual_calls = len(mock_logger_destination.log_metrics.mock_calls)
    assert num_actual_calls == num_expected_calls