code: def test_str_to_version(self):
      self.assertEqual(version._str_to_version("1.2.3"), (1, 2, 3))
      self.assertEqual(
          version._str_to_version("1.2.*", True), (1, 2, "*")
      )
      self.assertEqual(
          version._str_to_version("1.*.3", True), (1, "*", 3)
      )
      self.assertEqual(
          version._str_to_version("*.2.3", True), ("*", 2, 3)
      )
      self.assertEqual(
          version._str_to_version("1.*.*", True), (1, "*", "*")
      )
      with self.assertRaisesWithPredicateMatch(
          ValueError, "Invalid version "
      ):
          version.Version("1.3")
      with self.assertRaisesWithPredicateMatch(
          ValueError, "Invalid version "
      ):
          version.Version("1.3.*")
  
file_path: datasets/tensorflow_datasets/core/utils/version_test.py
imports: from tensorflow_datasets import testing
  from tensorflow_datasets.core.utils import version
label_desc: Use image node_id 1 for calling the VersionTest obj's underlying member method code with example usage: obj.test_str_to_version() without return types