def METHOD_NAME(tmpdir):
    """Check that all ranks can be logged from."""
    model = TestModel()
    all_rank_logger = AllRankLogger()
    trainer = Trainer(
        accelerator="cpu",
        devices=2,
        strategy="ddp_spawn",
        default_root_dir=tmpdir,
        limit_train_batches=1,
        limit_val_batches=1,
        max_epochs=1,
        enable_model_summary=False,
        logger=all_rank_logger,
        log_every_n_steps=1,
    )
    trainer.fit(model)