def METHOD_NAME(tmp_path, request: pytest.FixtureRequest):
    state = get_dummy_state(request)
    save_path = pathlib.Path(tmp_path) / 'state_dict.pt'
    with open(save_path, 'wb') as _tmp_file:
        torch.save(state.state_dict(), _tmp_file)
    loaded_state_dict = torch.load(save_path)
    expected_env_info_keys = {
        'composer_version', 'composer_commit_hash', 'node_world_size', 'host_processor_model_name',
        'host_processor_core_count', 'local_world_size', 'accelerator_model_name', 'cuda_device_count'
    }
    actual_env_info_keys = set(loaded_state_dict['metadata']['composer_env_info'].keys())
    assert expected_env_info_keys == actual_env_info_keys
    assert loaded_state_dict['metadata']['composer_env_info']['composer_version'] == composer.__version__
    assert loaded_state_dict['metadata']['device'] == 'cpu'
    assert loaded_state_dict['metadata']['precision'] == 'amp_fp16'
    assert loaded_state_dict['metadata']['world_size'] == 1
    assert loaded_state_dict['metadata']['device_train_microbatch_size'] == 2
    assert loaded_state_dict['metadata']['train_dataloader_batch_size'] == 4