<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fix_display(self):
 """If this is being run on a headless system the Matplotlib backend must be changed to one that doesn't need a display. """


        try:
            tkinter.Tk()
        except (tkinter.TclError, NameError): # If there is no display.
            try:
                import matplotlib as mpl
            except ImportError:
                pass
            else:
                print("Setting matplotlib backend to Agg")
                mpl.use('Agg')