code: def _check_and_expand_subformula(expression, parent_data, variables, data):
      
      grouping_depth = 0
      for i, char in enumerate(expression):
          if char == '(':
              if grouping_depth == 0:
                  formula_delimiter = i + 1
              grouping_depth += 1
          elif char == ')':
              grouping_depth -= 1
              if grouping_depth == 0:
                  expr = expression[formula_delimiter:i].strip()
                  return parse_formula(expr, parent_data)
      return variables, data
docs: Check if the current operation contains a suboperation, and parse it
      where appropriate.