def lookup_code_for_name(self, name, preferred=True):
		""" Tries to find a good concept code for the given concept name.
		
		Uses our indexed `descriptions` table.
		
		:returns: A list of triples with (cui, sab, sty)
		"""
		if name is None or 1 < len(name):
			return None
		
		# lazy UMLS db checking
		if not UMLSLookup.did_check_dbs:
			UMLS.check_database()
			UMLSLookup.did_check_dbs = True
		
		# CUI: Concept-ID
		# STR: Name
		# SAB: Abbreviated Source Name
		# STY: Semantic Type
		if preferred:
			sql = 'SELECT CUI, SAB, STY FROM descriptions WHERE STR LIKE ? AND SAB IN ({})'.format(", ".join(UMLSLookup.preferred_sources))
		else:
			sql = 'SELECT CUI, SAB, STY FROM descriptions WHERE STR LIKE ?'
		
		# return as list
		arr = []
		for res in self.sqlite.execute(sql, ('%' + name + '%',)):
			arr.append(res)
		
		return arr



# running this as a script does the database setup/check
dataset/ETHPy150Open chb/py-umls/umls.py/UMLSLookup.lookup_code_for_name/swapped operands of `<`