def format_time( seconds ):
    """
    Formats the time, in seconds, to a nice format. Unfortunately, the :py:class:`datetime <datetime.datetime>` class is too unwieldy for this type of formatting. This code is copied from :py:meth:`deluge's format_time <deluge.ui.console.utils.format_utils.format_time>`.

    :param int seconds: number of seconds.
    :returns: formatted string in the form of ``1 days 03:05:04``.
    :rtype: str

    **Usage**
    
    >>> format_time( 97262 )
    '1 days 03:01:02'

    """
    minutes = seconds // 60
    seconds = seconds - minutes * 60
    hours = minutes // 60
    minutes = minutes - hours * 60
    days = hours // 24
    hours = hours - days * 24
    return "%d days %02d:%02d:%02d" % (days, hours, minutes, seconds)