def write_constant_tier(total_duration, default_value, tc):
    """
    this function returns a string gestures of constant tiers (e.g. F0 and lung-pressure)

    defaultValue: default value of this constant tier
    tc: time_constant

    """

    return_str = ''

    # if it is a long empty gesture,
    # then split it into multiple gestures
    while total_duration > 1:
        temp_dur = 0.5
        return_str += f'    <gesture value="{default_value:.6f}" slope="0.000000" duration_s="{temp_dur:.6f}" time_constant_s="{tc:.6f}" neutral="0" />\n'
        total_duration -= temp_dur

    if total_duration < 0.01:
        total_duration=0.01
    return_str += f'    <gesture value="{default_value:.6f}" slope="0.000000" duration_s="{total_duration:.6f}" time_constant_s="{tc:.6f}" neutral="0" />\n'
    return return_str