@staticmethod
def format_time(seconds):
    """
        Converts seconds into seconds, minutes:seconds, or
        hours:minutes.seconds as appropriate.
        """
    try:
        minutes, seconds = divmod(float(seconds), 60)
        hours, minutes = divmod(minutes, 60)
        return_value = int(hours), int(minutes), float(seconds)
        if hours:
            return '{0:d}:{1:0>2d}:{2:0>6.3f}'.format(*return_value)
        elif minutes:
            return '{1:d}:{2:0>6.3f}'.format(*return_value)
        else:
            return '{2:.3f}'.format(*return_value)
    except (TypeError, ValueError):
        return ''
