def get_qualification_type_by_name(self, name):
max_fuzzy_matches_to_check = <NUM_LIT:100><EOL>query = name.upper()<EOL>start = time.time()<EOL>args = {<EOL>"<STR_LIT>": query,<EOL>"<STR_LIT>": False,<EOL>"<STR_LIT>": True,<EOL>"<STR_LIT>": max_fuzzy_matches_to_check,<EOL>}<EOL>results = self.mturk.list_qualification_types(**args)["<STR_LIT>"]<EOL>while not results and time.time() - start < self.max_wait_secs:<EOL><INDENT>time.sleep(<NUM_LIT:1>)<EOL>results = self.mturk.list_qualification_types(**args)["<STR_LIT>"]<EOL><DEDENT>if not results:<EOL><INDENT>return None<EOL><DEDENT>qualifications = [self._translate_qtype(r) for r in results]<EOL>if len(qualifications) > <NUM_LIT:1>:<EOL><INDENT>for qualification in qualifications:<EOL><INDENT>if qualification["<STR_LIT:name>"].upper() == query:<EOL><INDENT>return qualification<EOL><DEDENT><DEDENT>raise MTurkServiceException("<STR_LIT>".format(query))<EOL><DEDENT>return qualifications[<NUM_LIT:0>]<EOL>
Return a Qualification Type by name. If the provided name matches
        more than one Qualification, check to see if any of the results
        match the provided name exactly. If there's an exact match, return
        that Qualification. Otherwise, raise an exception.