Sorts the given aliases list, returns a sorted list.

        :param list aliases:
        :return: sorted aliases list
345258
def sort_aliases(self, aliases):
        
        self._cache_init()
        if not aliases:
            return aliases
        parent_aliases = self._cache_get_entry(self.CACHE_NAME_PARENTS).keys()
        return [parent_alias for parent_alias in parent_aliases if parent_alias in aliases]
376897
public <T extends Comparable<T>> void sort(List<T> list)
    {
        sort(list, defaultComp);
    }
813050
def sort(iterable):
    
    ips = sorted(normalize_ip(ip) for ip in iterable)
    return [clean_ip(ip) for ip in ips]
986571
function (list) {
		list.sort(function (a, b) {
			if (COMMAND_RANK[a.toString()] > COMMAND_RANK[b.toString()]) {
				return 1;
			} else if (COMMAND_RANK[a.toString()] < COMMAND_RANK[b.toString()]) {
				return -1;
			} else {
				return 0;
			}
		});

		return list;
	}
1234929
def _backwards_aliases(self):
        
        self.list_containers = self.list_container_names
        self.get_all_containers = self.list
        self.get_container = self.get
        self.create_container = self.create
        self.delete_container = self.delete
        self.get_container_objects = self.list_container_objects
        self.get_container_object_names = self.list_container_object_names
        self.get_info = self.get_account_info
892955
def __parse_aliases():
    '''
    
    '''
    afn = __get_aliases_filename()
    ret = []
    if not os.path.isfile(afn):
        return ret
    with salt.utils.files.fopen(afn, 'r') as ifile:
        for line in ifile:
            line = salt.utils.stringutils.to_unicode(line)
            match = __ALIAS_RE.match(line)
            if match:
                ret.append(match.groups())
            else:
                ret.append((None, None, line.strip()))
    return ret
327888
def as_alias_handler(alias_list):
    """"""
    list_ = list()
    for alias in alias_list:
        if alias.asname:
            list_.append(alias.asname)
        else:
            list_.append(alias.name)
    return list_
1140762
protected List<T> sort(final List<T> unsortedList)
	{
		final SortParam<S> sortParam = getSort();
		if (sortParam != null)
		{
			final String property = (String)sortParam.getProperty();
			final boolean ascending = sortParam.isAscending();
			ListExtensions.sortByProperty(unsortedList, property, ascending);
		}
		return unsortedList;
	}
912764
def index(self, alias):
        
        clone = self._clone()
        clone._index = alias
        return clone
967744
public static <T> ArrayList<T> sortThis(ArrayList<T> list, Comparator<? super T> comparator)
    {
        int size = list.size();
        if (ArrayListIterate.canAccessInternalArray(list))
        {
            Arrays.sort(ArrayListIterate.getInternalArray(list), 0, size, comparator);
        }
        else
        {
            Collections.sort(list, comparator);
        }
        return list;
    }
382118
def sort_return_tuples(response, groups=None, **options):
    
    if not response or not groups:
        return response
    return list(zip(*[response[i::groups] for i in range(groups)]))
280280
private List<String> aliasHeader(List<Object> headerList) {
		final int size = headerList.size();
		final ArrayList<String> result = new ArrayList<>(size);
		if (CollUtil.isEmpty(headerList)) {
			return result;
		}

		for(int i = 0; i < size; i++) {
			result.add(aliasHeader(headerList.get(i), i));
		}
		return result;
	}
1151279
def _sort(self, short_list, sorts):
        

        sort_values = self._index_columns(sorts)

        # RECURSIVE SORTING
        output = []
        def _sort_more(short_list, i, sorts):
            if len(sorts) == 0:
                output.extend(short_list)

            sort = sorts[0]

            index = self._index[sort_values[i]]
            if sort.sort == 1:
                sorted_keys = sorted(index.keys())
            elif sort.sort == -1:
                sorted_keys = reversed(sorted(index.keys()))
            else:
                sorted_keys = list(index.keys())

            for k in sorted_keys:
                self._sort(index[k] & short_list, i + 1, sorts[1:])

        _sort_more(short_list, 0, sorts)
        return output
686768
public static <T extends Comparable<? super T>> void sortReverse(List<T> list) {
		Collections.sort(list, Collections.reverseOrder());
	}
306181
public static <T extends Comparable<? super T>> void sort(List<T> list) {
		sort(list, QuickSort.<T>naturalOrder()); // JAVA_8 replace with Comparator.naturalOrder() (and cleanup)   
	}
10199
public static <T extends Comparable<? super T>> List<T> sort(final List<T> list) {
        Validate.notNull(list, "Cannot execute list sort: list is null");
        final Object[] a = list.toArray();
        Arrays.sort(a);
        
        return fillNewList(a, list.getClass());
    }
1064106
def list_aliases(self):
        """"""

        # check alias doesn't exist
        r = self.requests.get(self.index_url + "/_alias", headers=HEADER_JSON, verify=False)
        try:
            r.raise_for_status()
        except requests.exceptions.HTTPError as ex:
            logger.warning("Something went wrong when retrieving aliases on %s.",
                           self.anonymize_url(self.index_url))
            logger.warning(ex)
            return

        aliases = r.json()[self.index]['aliases']
        return aliases