def METHOD_NAME(self, sender, args):
    self.Close()
    self._config.set_option("index_grouping_pattern", self.grouping_pattern)
    with revit.Transaction("Reorder Sheets"):
        for item in self.items_list:
            idx_param = item.revit_item.LookupParameter(
                self.selected_item_param
            )
            if idx_param:
                idx_param.Set(item.order_index)