<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def duration(cls, seconds, first=True):
 """ Constructs a human readable string to indicate the time duration for the given seconds :param int seconds: :param bool first: Just return the first unit instead of all :rtype: str """

        num_units = []

        for unit in reversed(TimeUnit):
            if seconds >= unit.seconds:
                name = unit.name.lower()
                count = int(seconds / unit.seconds)
                num_units.append(f'{count} {plural(name, count=count)}')
                seconds -= count * unit.seconds

                if first or not seconds:
                    break

        return ' '.join(num_units)