def METHOD_NAME(self, sender, args):
    self.Close()
    try:
        with revit.Transaction('ReValue {}'.format(self.selected_param),
                               log_errors=False):
            for item in self._revalue_items:
                if item.newvalue:
                    element = revit.doc.GetElement(item.eid)
                    if self.selected_param == 'Name':
                        element.Name = item.newvalue
                    elif self.selected_param == 'Family: Name':
                        if element.Family:
                            element.Family.Name = item.newvalue
                    else:
                        param = element.LookupParameter(self.selected_param)
                        if param:
                            param.Set(item.newvalue)
    except Exception as ex:
        forms.alert(str(ex), title='Error')