code: def __init__(self, figure):
      self.figure = figure
      self.manager = new_figure_manager_given_figure(id(figure), figure)
  
      super().__init__(
          [
              # Static files for the CSS and JS
              (
                  r"/_static/(.*)",
                  tornado.web.StaticFileHandler,
                  {"path": FigureManagerWebAgg.get_static_file_path()},
              ),
              # Static images for the toolbar
              (
                  r"/_images/(.*)",
                  tornado.web.StaticFileHandler,
                  {"path": Path(mpl.get_data_path(), "images")},
              ),
              # The page that contains all of the pieces
              ("/", self.MainPage),
              ("/mpl.js", self.MplJs),
              # Sends images and events to the browser, and receives
              # events from the browser
              ("/ws", self.WebSocket),
              # Handles the downloading (i.e., saving) of static images
              (r"/download.([a-z0-9.]+)", self.Download),
          ]
      )
  
file_path: matplotlib/galleries/examples/user_interfaces/embedding_webagg_sgskip.py
imports: import argparse
  import io
  import json
  import mimetypes
  from pathlib import Path
  import signal
  import socket
  import tornado.httpserver
  import tornado.ioloop
  import tornado.web
  import tornado.websocket
  import numpy
  import matplotlib
  from matplotlib.backends.backend_webagg import FigureManagerWebAgg, new_figure_manager_given_figure
  from matplotlib.figure import Figure
label_desc: Use image node_id 1 to create a new MyApplication object from inherited base classes: tornado.web with example: obj = MyApplication(figure)