def _timedelta_total_seconds(td):
if hasattr(timedelta, "<STR_LIT>"):<EOL><INDENT>return getattr(td, "<STR_LIT>")()<EOL><DEDENT>return (td.microseconds + (td.seconds + td.days * <NUM_LIT> * <NUM_LIT>) * <NUM_LIT:10>**<NUM_LIT:6>) / float(<NUM_LIT:10>**<NUM_LIT:6>)<EOL>
Python 2.6 backward compatibility function for timedelta.total_seconds.

    :type td: timedelta object
    :param td: timedelta object

    :rtype: float
    :return: The total number of seconds for the given timedelta object.