code: def validate_key(func):
      
  
      @wraps(func)
      def wrapper(self, key, *args, **kwargs):
          if posixpath.sep in key:
              raise ValueError('Keys cannot contains slashes')
  
          return func(self, key, *args, **kwargs)
  
      return wrapper
docs: Decorator to validate a key for zookeeper.