code: def test_filter_versions(version_list, major, valid, result):
      if valid:
          assert (
              list(
                  MajorMinorAssetsVersioningSystem.filter_versions(
                      version_list, major
                  )
              )
              == result
          )
      else:
          with pytest.raises(InvalidMajorVersionError):
              MajorMinorAssetsVersioningSystem.filter_versions(
                  version_list, major
              )
  
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 5 for calling a global function with example usage: test_filter_versions(version_list, major, valid, result) without return types