def METHOD_NAME(route: RouteDetails, incoming_state, event, req: Request, res: Response):
    # Create page object with event info inserted
    model_mod = importlib.import_module(route["modelPy"], __package__)
    Page = getattr(model_mod, "Page")
    page_obj = Page(incoming_state)
    getattr(page_obj, "set_event")(event)
    # Pass the page object through the handle_event function
    entry_mod = importlib.import_module(route["entryPy"], __package__)
    if hasattr(entry_mod, "handle_event"):
        handle_event = getattr(entry_mod, "handle_event")
        handle_event(page_obj, req, res)
    # remove event_data from page_obj to make the response smaller
    delattr(page_obj, "event_data")
    # figure out which parts of the page_obj has been modified
    recorder = {}
    record_changes(page_obj, recorder)
    return recorder