code: def test_names(test, valid):
      if valid:
          AssetSpec.check_name_valid(test)
      else:
          with pytest.raises(errors.InvalidNameError):
              AssetSpec.check_name_valid(test)
  
imports: import pytest
  from modelkit.assets import errors
  from modelkit.assets.settings import AssetSpec
label_desc: Use image node_id 2 for calling a global function with example usage: test_names(test, valid) without return types