def METHOD_NAME(
    trainer_options: dict, model: LightningModule, data: LightningDataModule = None, min_acc: float = 0.50
):
    # fit model
    trainer = Trainer(**trainer_options)
    trainer.fit(model, datamodule=data)
    # correct result and ok accuracy
    assert trainer.state.finished, f"Training failed with {trainer.state}"
    model2 = load_model_from_checkpoint(trainer.checkpoint_callback.best_model_path, type(model))
    # test new model accuracy
    test_loaders = model2.test_dataloader() if not data else data.test_dataloader()
    if not isinstance(test_loaders, list):
        test_loaders = [test_loaders]
    if not isinstance(model2, BoringModel):
        for dataloader in test_loaders:
            run_model_prediction(model2, dataloader, min_acc=min_acc)