def seconds_to_timecode(seconds):
    """
    Converts seconds into a conditioned and simplified timecode string
    :param seconds: float, seconds
    :return: string, timecode in 'HH:MM:SS.SSS' format
    """
    h, s = divmod(seconds, 3600)
    m, s = divmod(s, 60)

    s = round(s * 1000)/1000

    hh = str(int(h))
    mm = str(int(m))
    ss = str(s)

    if len(hh) < 2:
        hh = '0' + hh
    if len(mm) < 2:
        mm = '0' + mm

    if ss.find('.') > 1:
        wholes, decimals = ss.split('.')
    else:
        wholes = ss

    if len(wholes) < 2:
        ss = '0' + ss

    return '{0}:{1}:{2}'.format(hh, mm, ss)