code: def test_vocab_required_transform(self):
      transforms_cls = get_transforms_cls(["bart", "switchout"])
      opt = Namespace(seed=-1, switchout_temperature=1.0)
      # transforms that require vocab will not create if not provide vocab
      transforms = make_transforms(opt, transforms_cls, vocabs=None)
      self.assertEqual(len(transforms), 0)
      with self.assertRaises(ValueError):
          transforms_cls["switchout"](opt).warm_up(vocabs=None)
          transforms_cls["bart"](opt).warm_up(vocabs=None)
  
imports: import unittest
  import copy
  import yaml
  import math
  from argparse import Namespace
  from onmt.transforms import get_transforms_cls, get_specials, make_transforms, TransformPipe
  from onmt.transforms.bart import BARTNoising
label_desc: Use image node_id 2 for calling the TestTransform obj's underlying member method code with example usage: obj.test_vocab_required_transform() without return types