def find_balance_index(source, start='{', end='}'):
    """Get the first balance index."""
    state = 1
    for index, char in enumerate(source):
        if char == start:
            state += 1
        elif char == end:
            state -= 1
        if state == 0:
            return index
    raise RuntimeError('This should not happen: Balance Not Found')
Get the first balance index.