code: def test_should_raise_on_invalid_versions(self):
      # Given
      invalid_versions = [
          "1",
          "1.2",
          "1.2.3-0123",
          "1.2.3-0123.0123",
          "1.1.2+.123",
          "+invalid",
          "-invalid",
          "-invalid+invalid",
          "-invalid.01",
          "alpha",
          "alpha.beta",
          "alpha.beta.1",
          "alpha.1",
          "alpha+beta",
          "alpha_beta",
          "alpha.",
          "alpha..",
          "beta",
          "1.0.0-alpha_beta",
          "-alpha.",
          "1.0.0-alpha..",
          "1.0.0-alpha..1",
          "1.0.0-alpha...1",
          "1.0.0-alpha....1",
          "1.0.0-alpha.....1",
          "1.0.0-alpha......1",
          "1.0.0-alpha.......1",
          "01.1.1",
          "1.01.1",
          "1.1.01",
          "1.2",
          "1.2.3.DEV",
          "1.2-SNAPSHOT",
          "1.2.31.2.3----RC-SNAPSHOT.12.09.1--..12+788",
          "1.2-RC-SNAPSHOT",
          "-1.0.3-gamma+b7718",
          "+justmeta",
          "9.8.7+meta+meta",
          "9.8.7-whatever+meta+meta",
          "99999999999999999999999.999999999999999999.99999999999999999"
          "----RC-SNAPSHOT.12.09.1--------------------------------..12",
      ]
  
      for v in invalid_versions:
          with self.assertRaises(ValueError) as exc:
              # When
              parse_version(v)
              # Then
              self.assertTrue(str(exc).startswith("Invalid version:"))
  
imports: from __future__ import unicode_literals
  import logging
  from future.builtins import object, str
  from future.utils import iteritems
  from mock import MagicMock
  from snips_nlu import __model_version__, __version__
  from snips_nlu.common.dict_utils import LimitedSizeDict
  from snips_nlu.common.log_utils import DifferedLoggingMessage
  from snips_nlu.common.utils import ranges_overlap, replace_entities_with_placeholders, parse_version
  from snips_nlu.constants import END, START
  from snips_nlu.preprocessing import tokenize_light
  from snips_nlu.tests.utils import SnipsTest
label_desc: Use image node_id 2 for calling the TestVersion obj's underlying member method code with example usage: obj.test_should_raise_on_invalid_versions() without return types