code: def test_check_version_valid(version, valid, values):
      if valid:
          MajorMinorAssetsVersioningSystem.check_version_valid(version)
          assert MajorMinorAssetsVersioningSystem().is_version_valid(
              version
          )
      else:
          with pytest.raises(errors.InvalidVersionError):
              MajorMinorAssetsVersioningSystem.check_version_valid(
                  version
              )
          assert (
              not MajorMinorAssetsVersioningSystem().is_version_valid(
                  version
              )
          )
  
imports: import os
  import pytest
  import tests
  from modelkit.assets import errors
  from modelkit.assets.settings import AssetSpec
  from modelkit.assets.versioning.major_minor import InvalidMajorVersionError, MajorMinorAssetsVersioningSystem, MajorVersionDoesNotExistError
label_desc: Use image node_id 2 for calling a global function with example usage: test_check_version_valid(version, valid, values) without return types