code: def test_sanitize():
      assert sanitize(good_vpc_config) == good_vpc_config
      assert sanitize(foo_vpc_config) == good_vpc_config
  
      assert sanitize(None) is None
  
      with pytest.raises(ValueError):
          sanitize([])
      with pytest.raises(ValueError):
          sanitize({})
  
      with pytest.raises(ValueError):
          sanitize({SUBNETS_KEY: 1})
      with pytest.raises(ValueError):
          sanitize({SUBNETS_KEY: []})
  
      with pytest.raises(ValueError):
          sanitize({SECURITY_GROUP_IDS_KEY: 1, SUBNETS_KEY: subnets})
      with pytest.raises(ValueError):
          sanitize({SECURITY_GROUP_IDS_KEY: [], SUBNETS_KEY: subnets})
  
imports: from __future__ import absolute_import
  import pytest
  from sagemaker.vpc_utils import SUBNETS_KEY, SECURITY_GROUP_IDS_KEY, to_dict, from_dict, sanitize
label_desc: Use image node_id 3 for calling a global function with example usage: test_sanitize() without return types