def __extract_term(expression):
    """
    Extract a term from an expression with parantheses

    :param expression:  The expression starting with a '('
    :return:            The extracted term string
    """
    open_parantheses = 0
    i = 0
    for char in expression:
        if char == '(':
            open_parantheses += 1
        elif char == ')':
            open_parantheses -= 1
        if open_parantheses == 0:
            return expression[1:i]
        i = i + 1
    raise SystemError('This point in the code should not be reachable')
