def METHOD_NAME(button):
    try:
        id = session_text.value
        self.spark_controller.delete_session_by_id(endpoint, id)
        self.ipython_display.writeln("Deleted session {} at {}".format(id, url))
    except ValueError as e:
        self.ipython_display.send_error(str(e))
        return
    self.refresh_method()