def get_summary_keys(classification):
    """Get the required summary keys for the experiment.

    Args:
        classification (boolean): Whether it is a classification task.

    Returns:
        The list of keys.
    """
    summary_keys = [# Average training loss on last epoch.
                'loss_train_last',
                # Best average training loss across all epochs.
                'loss_train_best',
                # Average testing loss on last epoch.
                'loss_test_last',
                # Best average testing loss across all epochs.
                'loss_test_best',
                # Average validation loss on last epoch.
                'loss_val_last',
                # Best average validation loss across all epochs.
                'loss_val_best',
                # Epoch with the best validation loss.
                'epoch_best_loss',
                # Train loss on best validation epoch.
                'loss_train_val_best',
                # Test loss on best validation epoch.
                'loss_test_val_best']
    if classification:
        classif_keys = [# Average training accuracy on last epoch.
                        'acc_train_last',
                        # Best average training accuracy across all epochs.
                        'acc_train_best',
                        # Average testing accuracy on last epoch.
                        'acc_test_last',
                        # Best average testing accuracy across all epochs.
                        'acc_test_best',
                        # Average validation accuracy on last epoch.
                        'acc_val_last',
                        # Best average validation accuracy across all epochs.
                        'acc_val_best',
                        # Epoch with the best validation accuracy.
                        'epoch_best_acc',
                        # Train loss on best validation epoch.
                        'acc_train_val_best',
                        # Test loss on best validation epoch.
                        'acc_test_val_best',
                    ]
        summary_keys.extend(classif_keys)
    # Average time taken by an epoch.
    summary_keys.append('avg_time_per_epoch')
    # Whether the simulation finished.
    summary_keys.append('finished')

    return summary_keys