code: def test_to_dict():
      assert to_dict(None, None) is None
      assert to_dict(subnets, None) is None
      assert to_dict(None, security_groups) is None
  
      assert to_dict(subnets, security_groups) == {
          SUBNETS_KEY: subnets,
          SECURITY_GROUP_IDS_KEY: security_groups,
      }
  
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 1 for calling a global function with example usage: test_to_dict() without return types