def custom_format(self, key_method, reverse=False):
        """
        Return a well formatted list. With the key_method as a function/method to format
        the elements before sorting.

        :param key_method:
            A function or method to use to format the
            readed element before sorting.
        :type key_method: function|method

        :param reverse: Tell us if we have to reverse the list.
        :type reverse: bool

        :return: A sorted list.
        :rtype: list
        """

        try:
            return sorted(list(set(self.main_list)), key=key_method, reverse=reverse)
        except TypeError:  # pragma: no cover
            return self.main_list
def custom_format(self, key_method, reverse=False):
        """
        Return a well formatted list. With the key_method as a function/method to format
        the elements before sorting.

        :param key_method:
            A function or method to use to format the
            readed element before sorting.
        :type key_method: function|method

        :param reverse: Tell us if we have to reverse the list.
        :type reverse: bool

        :return: A sorted list.
        :rtype: list
        """

        try:
            return sorted(list(set(self.main_list)), key=key_method, reverse=reverse)
        except TypeError:  # pragma: no cover
            return self.main_list
def custom_format ( self , key_method , reverse = False ) : try : return sorted ( list ( set ( self . main_list ) ) , key = key_method , reverse = reverse ) except TypeError : # pragma: no cover return self . main_list
Return a well formatted list. With the key_method as a function/method to format
        the elements before sorting.

        :param key_method:
            A function or method to use to format the
            readed element before sorting.
        :type key_method: function|method

        :param reverse: Tell us if we have to reverse the list.
        :type reverse: bool

        :return: A sorted list.
        :rtype: list
Return a well formatted list . With the key_method as a function / method to format the elements before sorting .