code: def registerStatsHandler(app, serverName, prefix='/status/'):
    
    if prefix[-1] != '/':
      prefix += '/'
    handler = functools.partial(statsHandler, serverName)
    app.add_url_rule(prefix, 'statsHandler', handler, methods=['GET'])
    app.add_url_rule(prefix + '<path:path>', 'statsHandler', handler, methods=['GET'])
docs: Register the stats handler with a Flask app, serving routes
    with a given prefix. The prefix defaults to '/status/', which is
    generally what you want.