def delta_to_str(rd):
parts = []<EOL>if rd.days > <NUM_LIT:0>:<EOL><INDENT>parts.append("<STR_LIT>" % (rd.days, plural(rd.days)))<EOL><DEDENT>clock_parts = []<EOL>if rd.hours > <NUM_LIT:0>:<EOL><INDENT>clock_parts.append("<STR_LIT>" % rd.hours)<EOL><DEDENT>if rd.minutes > <NUM_LIT:0> or rd.hours > <NUM_LIT:0>:<EOL><INDENT>clock_parts.append("<STR_LIT>" % rd.minutes)<EOL><DEDENT>if rd.seconds > <NUM_LIT:0> or rd.minutes > <NUM_LIT:0> or rd.hours > <NUM_LIT:0>:<EOL><INDENT>clock_parts.append("<STR_LIT>" % rd.seconds)<EOL><DEDENT>if clock_parts:<EOL><INDENT>parts.append("<STR_LIT::>".join(clock_parts))<EOL><DEDENT>return "<STR_LIT:U+0020>".join(parts)<EOL>
Convert a relativedelta to a human-readable string