Live Update doesn't work for multi apps

import datetime

import dash
import dash_html_components as html

def serve_layout():
    return html.H1('The time is: ' + str(

app.layout = serve_layout

if __name__ == '__main__':

@app.callback(Output('page-content', 'children'),
              [Input('url', 'pathname')])
def display_page(pathname):
    if pathname == '/apps/app1':
        return app1.layout
    elif pathname == '/apps/app2':
        return app2.layout
        return '404'

The callback for <Output page-content.children>
returned a value having type function
which is not JSON serializable.

The value in question is either the only value returned,
or is in the top level of the returned list,
and has string representation
<function serve_layout at 0x000002D972BEAB88>

In general, Dash properties can only be
dash components, strings, dictionaries, numbers, None,
or lists of those.

try return serve_layout()