code: def from_dict(vpc_config, do_sanitize=False):
      
      if do_sanitize:
          vpc_config = sanitize(vpc_config)
      if vpc_config is None:
          return None, None
      return vpc_config[SUBNETS_KEY], vpc_config[SECURITY_GROUP_IDS_KEY]
docs: Extracts subnets and security group ids as lists from a VpcConfig dict
  
      Args:
          vpc_config (dict): a VpcConfig dict containing 'Subnets' and 'SecurityGroupIds'
          do_sanitize (bool): whether to sanitize the VpcConfig dict before extracting values
  
      Returns:
          Tuple of lists as (subnets, security_group_ids)
          If vpc_config parameter is None, returns (None, None)
  
      Raises:
          ValueError if sanitize enabled and vpc_config is invalid
          KeyError if sanitize disabled and vpc_config is missing key(s)