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

def exhaustive_iri_check( self,
                              ontology:pd.DataFrame,
                              iri_predicate:str,
                              diff:bool=True, ) -> Tuple[list]:
        ''' All entities with conflicting iris gets a full diff to see if they belong

            Args:
                ontology: pandas DataFrame created from an ontology where the colnames are predicates
                    and if classes exist it is also thrown into a the colnames.
                iri_predicate: usually in qname form and is the colname of the DataFrame for iri
                    Default is "iri" for graph2pandas module
                diff: complete exhaustive diff if between curie matches... will take FOREVER if there are a lot -> n^2
            Returns:
                inside: entities that are inside of InterLex
                outside: entities NOT in InterLex
                diff (optional): List[List[dict]]... so complicated but usefull diff between matches only '''

        inside, outside = [], []
        header = ['Index'] + list(ontology.columns)
        for row in ontology.itertuples():

            row = {header[i]:val for i, val in enumerate(row)}
            entity_iri = row[iri_predicate]
            if isinstance(entity_iri, list):
                if len(entity_iri) != 0:
                    exit('Need to have only 1 iri in the cell from the onotology.')
                else:
                    entity_iri = entity_iri[0]

            ilx_row = self.iri2row.get(entity_iri)
            if ilx_row:
                inside.append({
                    'external_ontology_row': row,
                    'ilx_rows': [ilx_row],
                })
            else:
                outside.append(row)

        if diff:
            diff = self.__exhaustive_diff(inside)
            return inside, outside, diff
        return inside, outside