def get_closing_brace_index(string):
    """
    Returns the index of the last closing brace `{` in a BibTeX entry.

    """
    count = 0
    for i, s in enumerate(string):
        if s == "{":
            count += 1
        elif s == "}":
            count -= 1
            if count == 0:
                return i
    return 0