code: def add(self, path):
          
          if not isinstance(path, str) and not isinstance(path, unicode):
              raise TypeError('The value passed for parameter path is not a str'
                              ' or unicode')
  
          resource = Resource(path)
          self.resources[path] = resource
          return resource
docs: Adds a new resource with the given path to the resource set.
  
          Parameters:
              * **path (str, unicode):** path of the resource to be protected
  
          Raises:
              TypeError when the path is not a string or a unicode string