code: def test_exception(self):
      # load model from empty file
      with util.TempDirectory() as tmp_empty_file:
          with self.assertRaises(IOError):
              tc.load_model(tmp_empty_file)
  
      # load model from non-existing file
      if os.path.exists("./tmp_model-%d" % temp_number):
          shutil.rmtree("./tmp_model-%d" % temp_number)
      with self.assertRaises(IOError):
          tc.load_model("./tmp_model-%d" % temp_number)
  
      # save model to invalid url
      restricted_place = None
      if sys.platform == "win32":
          restricted_place = (
              "C:\\Windows\\System32\\config\\RegBack\\testmodel"
          )
      else:
          restricted_place = "/root/tmp/testmodel"
      for url in ["http://test", restricted_place]:
          with self.assertRaises(IOError):
              self.pr_model.save(url)
  
file_path: turicreate/src/python/turicreate/test/test_models.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import absolute_import
  import turicreate
  import os
  import unittest
  from .None import util
  import shutil
  import random
  import sys
label_desc: Use image node_id 6 for calling the TestModel obj's underlying member method code with example usage: obj.test_exception() without return types