def _term_divider_is_IN(self, i: int, filter_string: str) -> bool:
        """
        Given 'i' and the full filter string, determine if 'i' is at the beginning of the IN term divider.
        If any of the spaces or parenthesis are missing, this will return False.
        """
        candidate_substring = filter_string[i:i + len(self.IN_TERM_DIVIDER)].upper()
        # Extra check if substring has " IN " but is missing the open parenthesis
        if candidate_substring[:4] == ' IN ' and candidate_substring[4] != '(':
            self._error("Expected ( after ' IN '", filter_string, i)

        return candidate_substring == self.IN_TERM_DIVIDER

        Given 'i' and the full filter string, determine if 'i' is at the beginning of the IN term divider.
        If any of the spaces or parenthesis are missing, this will return False.
        
src/marqo/core/search/search_filter.py