code: def selected_unit(self):
          
          item = self.lstUnits.currentItem()
          try:
              return definition(item.data(QtCore.Qt.UserRole))
          except (AttributeError, NameError):
              return None
docs: Obtain the unit selected by user.
  
          :returns: Metadata of the selected unit.
          :rtype: dict, None