def METHOD_NAME(self, func, route, methods):
    """To enable multiple dashboards to run in the same notebook we need to
    prevent them from using the same method names (in addition to using
    dedicated ports). We rename the function for that purpose and
    manually add the URL rule instead of using the route decorator.
    """
    func.__name__ = func.__name__ + str(id(self))
    self._service.app.METHOD_NAME(
        route,
        endpoint=func.__name__,
        view_func=func,
        methods=methods)