code: def route(cls, path):
      
  
      if not path.startswith('/'):
        raise ValueError('Routes must start with "/"')
  
      def wrap(fn):
        setattr(fn, cls.ROUTE_ATTRIBUTE, path)
        return fn
  
      return wrap
docs: A decorator to indicate that a method should be a routable HTTP endpoint.
  
      .. code-block:: python
  
          from compactor.process import Process
  
          class WebProcess(Process):
            @Process.route('/hello/world')
            def hello_world(self, handler):
              return handler.write('<html><title>hello world</title></html>')
  
      The handler passed to the method is a tornado RequestHandler.
  
      WARNING: This interface is alpha and may change in the future if or when
      we remove tornado as a compactor dependency.
  
      :param path: The endpoint to route to this method.
      :type path: ``str``