def _search_uid(self, query):
try:<EOL><INDENT>yield self.contacts[query]<EOL><DEDENT>except KeyError:<EOL><INDENT>for uid in self.contacts:<EOL><INDENT>if uid.startswith(query):<EOL><INDENT>yield self.contacts[uid]<EOL><DEDENT><DEDENT><DEDENT>
Search for contacts with a matching uid.

        :param query: the query to search for
        :type query: str
        :yields: all found contacts
        :rtype: generator(carddav_object.CarddavObject)