code: def test_set_invalid_state(self):
      config = self._get_config()
      opt = build_optimizer(config)
      opt.set_param_groups(self._parameters())
      self.assertTrue(isinstance(opt, self._instance_to_test()))
  
      with self.assertRaises(KeyError):
          opt.set_classy_state({})
  
imports: from abc import ABC, abstractmethod
  from unittest.mock import MagicMock
  import torch
  import torch.nn
  from classy_vision.generic.util import split_batchnorm_params
  from classy_vision.models import ClassyModel
  from classy_vision.optim import build_optimizer, build_optimizer_schedulers
  from classy_vision.optim.param_scheduler import LinearParamScheduler
label_desc: Use image node_id 10 for calling the TestOptimizer obj's underlying member method code with example usage: obj.test_set_invalid_state() without return types