def METHOD_NAME(tmpdir):
    """Make sure DDP + AMP work."""
    # simulate setting slurm flags
    model = AMPTestModel()
    # exp file to get meta
    logger = tutils.get_default_logger(tmpdir)
    # exp file to get weights
    checkpoint = tutils.init_checkpoint_callback(logger)
    # fit model
    trainer = Trainer(
        default_root_dir=tmpdir,
        max_epochs=1,
        accelerator="gpu",
        devices=[0],
        strategy="ddp_spawn",
        precision="16-mixed",
        callbacks=[checkpoint],
        logger=logger,
    )
    trainer.fit(model)
    assert isinstance(trainer.strategy.cluster_environment, SLURMEnvironment)