  import os
  import tkinter as tk
  
  from tkinter import ttk
  from math import ceil, floor
  
  import numpy as np
  import matplotlib
 
</s> remove # pylint: disable=wrong-import-position
matplotlib.use("TkAgg")

from matplotlib import style  # noqa
from matplotlib.figure import Figure  # noqa
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg,  # noqa
 </s> add from matplotlib import style
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg, </s> remove """ Graph functions for Display Frame of the Faceswap GUI """
 </s> add """ Graph functions for Display Frame area of the Faceswap GUI """ </s> remove from .custom_widgets import Tooltip  # noqa
from .utils import get_config, get_images, LongRunningTask  # noqa

logger = logging.getLogger(__name__)  # pylint: disable=invalid-name


class NavigationToolbar(NavigationToolbar2Tk):  # pylint: disable=too-many-ancestors
    """ Same as default, but only including buttons we need
        with custom icons and layout
        From: https://stackoverflow.com/questions/12695678 """
    toolitems = [t for t in NavigationToolbar2Tk.toolitems if
                 t[0] in ("Home", "Pan", "Zoom", "Save")]

    @staticmethod
    def _Button(frame, text, file, command, extension=".gif"):  # pylint: disable=arguments-differ
        """ Map Buttons to their own frame.
            Use custom button icons, Use ttk buttons pack to the right """
        iconmapping = {"home": "reload",
                       "filesave": "save",
                       "zoom_to_rect": "zoom"}
        icon = iconmapping[file] if iconmapping.get(file, None) else file
        img = get_images().icons[icon]
        btn = ttk.Button(frame, text=text, image=img, command=command)
        btn.pack(side=tk.RIGHT, padx=2)
        return btn

    def _init_toolbar(self):
        """ Same as original but ttk widgets and standard tool-tips used. Separator added and
            message label packed to the left """
        xmin, xmax = self.canvas.figure.bbox.intervalx
        height, width = 50, xmax-xmin
        ttk.Frame.__init__(self, master=self.window, width=int(width), height=int(height))

        sep = ttk.Frame(self, height=2, relief=tk.RIDGE)
        sep.pack(fill=tk.X, pady=(5, 0), side=tk.TOP)

        self.update()  # Make axes menu

        btnframe = ttk.Frame(self)
        btnframe.pack(fill=tk.X, padx=5, pady=5, side=tk.RIGHT)
 </s> add from .custom_widgets import Tooltip
from .utils import get_config, get_images, LongRunningTask </s> remove     def axes_data_get_min_max(data):
        """ Return the minimum and maximum values from list of lists """
        ymin, ymax = list(), list()
 </s> add     def _axes_data_get_min_max(data: List[float]) -> Tuple[float]:
        """ Obtain the minimum and maximum values for the y-axis from the given data points.

        Parameters
        ----------
        data: list
            The data points for the Y Axis

        Returns
        -------
        tuple
            The minimum and maximum values for the y axis
        """
        ymin, ymax = [], []
from typing import Union, List, Tuple
  import os
  import tkinter as tk
  
  from tkinter import ttk
from typing import Union, List, Tuple
  from math import ceil, floor
  
  import numpy as np
  import matplotlib
keep keep keep add keep keep keep keep
 Update matplotlib requirement
  - bump min requirement to 3.5.1
  - Fix custom toolbar for v3.5.1
  - Documentation + linting 
lib/gui/display_graph.py