def timedelta2period(duration):
seconds = duration.seconds<EOL>minutes = (seconds % <NUM_LIT>) // <NUM_LIT><EOL>seconds = (seconds % <NUM_LIT>)<EOL>return '<STR_LIT>'.format(minutes, seconds)<EOL>
Convert timedelta to different formats.