In Flask, how to make all subroutes pass also through the common parent route?

Solution
@app.route("/rest")
def base():
    response = common_operation()
    return response.json()

@app.route("/rest/sr1")
def subroute1():
    op = common_operation()
    op1 = further_operations(op)
    return op1