code: def assert_valid_path(self, path):
          
          if not isinstance(path, str):
              raise NotFoundResourceException(
                  "Resource passed to load() method must be a file path")
  
          if not os.path.isfile(path):
              raise NotFoundResourceException(
                  'File "{0}" does not exist'.format(path))
docs: Ensures that the path represents an existing file
  
          @type path: str
          @param path: path to check