def METHOD_NAME(self, name: str, parameters: Dict[str, Pmd2PatchParameter]) -> Dict[str, Union[str, int]]:
    content: Gtk.Box = self.window.get_content_area()
    self.window.set_title(_('Settings for the "{}" Patch').format(name))
    content.pack_start(
        Gtk.Label.new(_('The patch "{}" requires additional configuration:').format(name)),
        False, False, 10
    )
    grid: Gtk.Grid = Gtk.Grid.new()
    grid.set_column_spacing(5)
    grid.set_row_spacing(5)
    controls = {}
    for i, param in enumerate(parameters.values()):
        grid.attach(Gtk.Label.new(_(param.label) + ':'), 0, i, 1, 1)
        controls[param.name] = self._generate_control(param)
        grid.attach(controls[param.name], 1, i, 1, 1)
    content.pack_start(
        grid,
        True, True, 10
    )
    content.show_all()
    response = self.window.METHOD_NAME()
    self.window.hide()
    if response != Gtk.ResponseType.APPLY:
        raise PatchCanceledError()
    config = {}
    for param_name, control in controls.items():
        config[param_name] = self._process_control(control, parameters[param_name])
    return config