code: def save_json_dict(filename, json_dict):
  	
  	if isinstance(json_dict, dict):
  		with open(filename, "w") as f:
  			f.write(json.dumps(json_dict, indent=4))
  	else:
  		raise TypeError("json_dict was not a dictionay. couldn't save.")
docs: Will error if filename is not appropriate, but it's checked elsewhere.