code: def accept(self):
          
          output_path = self.output_path_line_edit.text()
          if not output_path:
              display_warning_message_box(
                  self,
                  tr('Empty Output Path'),
                  tr('Output path can not be empty'))
              return
          try:
              self.convert_metadata()
          except MetadataConversionError as e:
              display_warning_message_box(
                  self,
                  tr('Metadata Conversion Failed'),
                  str(e))
              return
  
          if not os.path.exists(output_path):
              display_warning_message_box(
                  self,
                  tr('Metadata Conversion Failed'),
                  tr('Result file is not found.'))
              return
  
          display_success_message_bar(
              tr('Metadata Conversion Success'),
              tr('You can find your copied layer with metadata version 3.5 in '
                 '%s' % output_path),
              iface_object=self.iface
          )
          super(MetadataConverterDialog, self).accept()
docs: Method invoked when OK button is clicked.