Sorts the given aliases list, returns a sorted list.

        :param list aliases:
        :return: sorted aliases list

def sort_aliases(self, aliases):
        """Sorts the given aliases list, returns a sorted list.

        :param list aliases:
        :return: sorted aliases list
        """
        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]