<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def _get_section_end_index(self, section, section_start):
        '''Get end of section's content.

        In the loop to match braces, we must not count curly braces that are
        within a doubly quoted string.

        :param section: string name of section
        :param section_start: integer index of section's beginning
        :return: integer index of section's end
        :raises: CurlyBraceMismatchException
        '''

        brace_count = 0
        in_quote = False
        in_escape = False

        for index, char in enumerate(self.template_str[section_start:]):
            # This check is to look for items inside of an escape sequence.
            #
            # For example, in the iApp team's iApps, there is a proc called
            # "iapp_get_items" which has a line that looks like this.
            #
            #     set val [string map {\" ""} $val]
            #
            # This will cause this parser to fail because of the unbalanced
            # quotes. Therefore, this conditional takes this into consideration
            #
            if char == '\\' and not in_escape:
                in_escape = True
            elif char == '\\' and in_escape:
                in_escape = False

            if not in_escape:
                if char == '"' and not in_quote:
                    in_quote = True
                elif char == '"' and in_quote:
                    in_quote = False

            if char == '{' and not in_quote:
                brace_count += 1
            elif char == '}' and not in_quote:
                brace_count -= 1

            if brace_count is 0:
                return index + section_start

        if brace_count is not 0:
            raise CurlyBraceMismatchException(
                'Curly braces mismatch in section %s.' % section
                )