<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_print_setup(self, print_data):
 """Opens print setup dialog and returns print_data"""


        psd = wx.PageSetupDialogData(print_data)
        # psd.EnablePrinter(False)
        psd.CalculatePaperSizeFromId()
        dlg = wx.PageSetupDialog(self.main_window, psd)
        dlg.ShowModal()

        # this makes a copy of the wx.PrintData instead of just saving
        # a reference to the one inside the PrintDialogData that will
        # be destroyed when the dialog is destroyed
        data = dlg.GetPageSetupData()
        new_print_data = wx.PrintData(data.GetPrintData())
        new_print_data.PaperId = data.PaperId
        new_print_data.PaperSize = data.PaperSize

        dlg.Destroy()

        return new_print_data