code: def test_deepspeed_load_checkpoint_no_state(tmp_path):
      """Test that DeepSpeed can't load the full state without access to a model instance from the user."""
      strategy = DeepSpeedStrategy()
      with pytest.raises(
          ValueError,
          match=escape(
              "Got DeepSpeedStrategy.load_checkpoint(..., state=None"
          ),
      ):
          strategy.load_checkpoint(path=tmp_path, state=None)
      with pytest.raises(
          ValueError,
          match=escape(
              "Got DeepSpeedStrategy.load_checkpoint(..., state={})"
          ),
      ):
          strategy.load_checkpoint(path=tmp_path, state={})
  
imports: import json
  from re import escape
  from unittest import mock
  from unittest.mock import ANY, Mock
  import pytest
  import torch
  from lightning.fabric.accelerators import CPUAccelerator, CUDAAccelerator
  from lightning.fabric.strategies import DeepSpeedStrategy
  from torch.optim import Optimizer
  from tests_fabric.helpers.runif import RunIf
label_desc: Use image node_id 16 for calling a global function with example usage: test_deepspeed_load_checkpoint_no_state(tmp_path) without return types