code: def accept(self):
          
          # set parameter from dialog
          input_layer = self.layer.currentLayer()
          output_path = self.output_form.text()
          radius = self.get_classification()
          # monkey patch keywords so layer works on multi buffering function
          input_layer.keywords = {'inasafe_fields': {}}
  
          # run multi buffering
          self.output_layer = multi_buffering(input_layer, radius)
  
          # save output layer to data store and check whether user
          # provide the output path.
          if output_path:
              self.output_directory, self.output_filename = (
                  os.path.split(output_path))
              self.output_filename, self.output_extension = (
                  os.path.splitext(self.output_filename))
  
          # if user do not provide the output path, create a temporary file.
          else:
              self.output_directory = temp_dir(sub_dir='work')
              self.output_filename = (
                  unique_filename(
                      prefix='hazard_layer',
                      suffix='.geojson',
                      dir=self.output_directory))
              self.output_filename = os.path.split(self.output_filename)[1]
              self.output_filename, self.output_extension = (
                  os.path.splitext(self.output_filename))
  
          self.data_store = Folder(self.output_directory)
          if self.output_extension == '.shp':
              self.data_store.default_vector_format = 'shp'
          elif self.output_extension == '.geojson':
              self.data_store.default_vector_format = 'geojson'
          self.data_store.add_layer(self.output_layer, self.output_filename)
  
          # add output layer to map canvas
          self.output_layer = self.data_store.layer(self.output_filename)
  
          QgsProject.instance().addMapLayers(
              [self.output_layer])
          self.iface.setActiveLayer(self.output_layer)
          self.iface.zoomToActiveLayer()
          self.done(QtWidgets.QDialog.Accepted)
  
          if self.keyword_wizard_checkbox.isChecked():
              self.launch_keyword_wizard()
docs: Process the layer for multi buffering and generate a new layer.
  
          .. note:: This is called on OK click.