Calculates the equivalent time of the given milliseconds into a human readable string from seconds to weeks.
        :param time_millis: Time in milliseconds using python time library.
        :return:            Human readable time string. Example: 2 min 3 s.

def millis_to_human_readable(time_millis):
        """
        Calculates the equivalent time of the given milliseconds into a human readable string from seconds to weeks.
        :param time_millis: Time in milliseconds using python time library.
        :return:            Human readable time string. Example: 2 min 3 s.
        """
        weeks = 0
        days = 0
        hours = 0
        minutes = 0
        seconds = round(time_millis / 1000)

        while seconds > 59:
            seconds -= 60
            minutes += 1

        while minutes > 59:
            minutes -= 60
            hours += 1

        while hours > 23:
            hours -= 24
            days += 1

        while days > 6:
            hours -= 7
            weeks += 1

        if weeks > 0:
            output = '{} w {} d {} h {} min {} s'.format(weeks, days, hours, minutes, seconds)
        elif days > 0:
            output = '{} d {} h {} min {} s'.format(days, hours, minutes, seconds)
        elif hours > 0:
            output = '{} h {} min {} s'.format(hours, minutes, seconds)
        elif minutes > 0:
            output = '{} min {} s'.format(minutes, seconds)
        elif seconds > 0:
            output = '{} s'.format(seconds)
        else:
            output = ''

        return output