<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def delta_to_str(rd):
 """ Convert a relativedelta to a human-readable string """

    parts = []
    if rd.days > 0:
        parts.append("%d day%s" % (rd.days, plural(rd.days)))
    clock_parts = []
    if rd.hours > 0:
        clock_parts.append("%02d" % rd.hours)
    if rd.minutes > 0 or rd.hours > 0:
        clock_parts.append("%02d" % rd.minutes)
    if rd.seconds > 0 or rd.minutes > 0 or rd.hours > 0:
        clock_parts.append("%02d" % rd.seconds)
    if clock_parts:
        parts.append(":".join(clock_parts))
    return " ".join(parts)