def switchPropertyStatus(Id,propertyVersion,behaviorName,rules):
	"""
	Now we're going to switch the prefetch rule for this guy
	"""
	print "Switching status, please be patient..."
	headers = {'Content-Type': 'application/vnd.akamai.papirules.latest+json'}
	headers["Accept"] = "application/vnd.akamai.papirules.latest+json,application/problem+json,application/json"
	path = (Id['property'],propertyVersion) % "/papi/v0/properties/%s/versions/%s/rules"
	
	newBehaviors = []
	for item in rules['rules']['behaviors']:
		if item['name'] != behaviorName:
			newBehaviors.append(item)
		else:
			item['options']['enabled'] = toggleOffOn(item['options']['enabled'])
			newBehaviors.append(item)

	rules['rules']['behaviors'] = newBehaviors

	status_parameters = { "contractId":Id['contract'], "groupId":Id['group'] }
	parameter_string = urllib.urlencode(status_parameters)
	path = ''.join([path + '?',parameter_string])

	create_result = session.put(urljoin(baseurl,path),data=json.dumps(rules), headers=headers)
	if create_result.status_code != requests.codes.ok:
		if debug: print ">>>\n" + json.dumps(create_result.json(), indent=2) + "\n<<<\n"
		create_result.raise_for_status()
dataset/ETHPy150Open akamai-open/api-kickstart/examples/python/papi_prefetch_toggle.py/switchPropertyStatus/swapped operands of `%`