def get_variable_values_sorted(variable):
 if variable.is_continuous:
  return []
 try:
  return sorted(variable.values, key=int)
 except ValueError:
  return variable.values

def get_variable_values_sorted ( variable ) : if variable . is_continuous : return [ ] try : return sorted ( variable . values , key = int ) except ValueError : return variable . values
return a list of sorted values for given attribute .