code: def _get_preset_id(package, size):
      
      for preset in package['activePresets'] + package['accountRestrictedActivePresets']:
          if preset['keyName'] == size or preset['id'] == size:
              return preset['id']
  
      raise SoftLayer.SoftLayerError("Could not find valid size for: '%s'" % size)
docs: Get the preset id given the keyName of the preset.