<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def find_prefix(self, iri: Union[URIRef, Literal, str]) -> Union[None, str]: """ Finds if uri is in common_namespaces Auto adds prefix if incoming iri has a uri in common_namespaces. If its not in the local library, then it will just be spit out as the iri and not saved/condensed into qualified names. The reason for the maxes is find the longest string match. This is to avoid accidently matching iris with small uris when really is a more complete uri that is the match. Args: iri: iri to be searched to find a known uri in it. Eample: In [1]: print(find_prefix("http://www.w3.org/2000/01/rdf-schema#label")) Out [1]: "http://www.w3.org/2000/01/rdf-schema#" In [2]: print(find_prefix("http://made_up_uri/label")) Out [2]: None """

        iri = str(iri)
        max_iri_len = 0
        max_prefix = None
        for prefix, uri in common_namespaces.items():
            if uri in iri and max_iri_len < len(uri): # if matched uri is larger; replace as king
                max_prefix = prefix
                max_iri_len = len(uri)
        return max_prefix