code: def test_invalid_config(self):
      config = self._get_valid_mixed_config()
      bad_config = copy.deepcopy(config)
  
      # No schedulers
      bad_config["schedulers"] = []
      bad_config["lengths"] = []
      with self.assertRaises(ValueError):
          CompositeParamScheduler.from_config(bad_config)
  
      # Size of schedulers and lengths doesn't match
      bad_config["schedulers"] = copy.deepcopy(config["schedulers"])
      bad_config["lengths"] = copy.deepcopy(config["lengths"])
      bad_config["schedulers"].append(bad_config["schedulers"][-1])
      with self.assertRaises(ValueError):
          CompositeParamScheduler.from_config(bad_config)
  
      # Sum of lengths < 1
      bad_config["schedulers"] = copy.deepcopy(config["schedulers"])
      bad_config["lengths"][-1] -= 0.1
      with self.assertRaises(ValueError):
          CompositeParamScheduler.from_config(bad_config)
  
      # Sum of lengths > 1
      bad_config["lengths"] = copy.deepcopy(config["lengths"])
      bad_config["lengths"][-1] += 0.1
      with self.assertRaises(ValueError):
          CompositeParamScheduler.from_config(bad_config)
  
      # Bad value for update_interval
      bad_config["lengths"] = copy.deepcopy(config["lengths"])
      bad_config["update_interval"] = "epochs"
      with self.assertRaises(Exception):
          CompositeParamScheduler.from_config(bad_config)
  
      # Bad value for composition_mode
      del bad_config["update_interval"]
      bad_config["interval_scaling"] = ["rescaled", "rescaleds"]
      with self.assertRaises(AssertionError):
          CompositeParamScheduler.from_config(bad_config)
  
      # Wrong number composition modes
      del bad_config["interval_scaling"]
      bad_config["interval_scaling"] = ["rescaled"]
      with self.assertRaises(AssertionError):
          CompositeParamScheduler.from_config(bad_config)
  
      # Missing required parameters
      del bad_config["interval_scaling"]
      bad_config["lengths"] = config["lengths"]
      del bad_config["lengths"]
      with self.assertRaises(AssertionError):
          CompositeParamScheduler.from_config(bad_config)
  
      bad_config["lengths"] = config["lengths"]
      del bad_config["schedulers"]
      with self.assertRaises(AssertionError):
          CompositeParamScheduler.from_config(bad_config)
  
file_path: ClassyVision/test/optim_param_scheduler_composite_test.py
imports: import copy
  import unittest
  from classy_vision.optim.param_scheduler import build_param_scheduler
  from classy_vision.optim.param_scheduler.composite_scheduler import CompositeParamScheduler, IntervalScaling, UpdateInterval
label_desc: Use image node_id 5 for calling the TestCompositeScheduler obj's underlying member method code with example usage: obj.test_invalid_config() without return types