<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Growler Example in Jupyter
Step1:  Create growler application with name NotebookServer
Step2:  Add a general purpose method which prints ip address and the USER-AGENT header
Step3:  Next, add a route matching any GET requests for the root (/) of the site. This uses a simple global variable to count the number times this page has been accessed, and return text to the client
Step4:  We can see the tree of middleware all requests will pass through - Notice the router object that was implicitly created which will match all requests.
Step5:  Use the helper method to create the asyncio server listening on port 9000.
<ASSISTANT_TASK:>
Python Code:
import growler
growler.__meta__.version_info
Explanation: Growler Example in Jupyter
End of explanation
app = growler.App("NotebookServer")
Explanation: Create growler application with name NotebookServer
End of explanation
@app.use
def print_client_info(req, res):
    ip = req.ip
    reqpath = req.path
    print("[{ip}] {path}".format(ip=ip, path=reqpath))
    print("  >", req.headers['USER-AGENT'])
    print(flush=True)
Explanation: Add a general purpose method which prints ip address and the USER-AGENT header
End of explanation
i = 0
@app.get("/")
def index(req, res):
    global i
    res.send_text("It Works! (%d)" % i)
    i += 1
Explanation: Next, add a route matching any GET requests for the root (/) of the site. This uses a simple global variable to count the number times this page has been accessed, and return text to the client
End of explanation
app.print_middleware_tree()
Explanation: We can see the tree of middleware all requests will pass through - Notice the router object that was implicitly created which will match all requests.
End of explanation
app.create_server_and_run_forever(host='127.0.0.1', port=9000)
Explanation: Use the helper method to create the asyncio server listening on port 9000.
End of explanation
<END_TASK>