def round_off_embedding(start_time, float_embed_width=0.5):
    """Round a number to the closest half integer.
    round_off_embedding(1.3)
    1.5
    round_off_embedding(2.6)
    2.5
    round_off_embedding(3.0)
    3.0
    round_off_embedding(4.1)
    4.0
    round_off_embedding(4.1, 0.25)
    4.0
    """
    reciprocal = int(1 / float_embed_width)
    embed_id = round(start_time * reciprocal) / reciprocal
    embed_id = round(start_time * reciprocal)
    return embed_id