def METHOD_NAME(self, entities):
    try:
        # {'entities': {'attribute': 'molecular weight', 'entity': 'benzene'},
        #  'type': 'item_attribute_query'}
        question_type = entities['type']
        list_of_entities = entities['entities']
        results = []
        for key, value in list_of_entities.items():
            if key == 'comparison' or key == 'number':
                value = filter_components(term_type=key, term=value)
                if value is None:
                    return None
                obj_temp = {key: value}
                results.append(obj_temp)
            else:
                if type(value) is list:
                    for v in value:
                        v = filter_components(term_type=key, term=v)
                        if v is None:
                            return None
                        uris = self.find_matches_from_wiki(term=v, mode=key, intent=question_type)
                        if uris == 'Error001':
                            return 'Error001'
                        obj_temp = {key: remove_duplicated(uris)}
                        results.append(obj_temp)
                else:
                    value = filter_components(term_type=key, term=value)
                    if value is None:
                        return None
                    uris = self.find_matches_from_wiki(term=value, mode=key, intent=question_type)
                    if uris == 'Error001':
                        return 'Error001'
                    try:
                        obj_temp = {key: remove_duplicated(uris)}
                    except:
                        print(uris)
                        print('Remove duplicate failed')
                        return None
                    results.append(obj_temp)
        return {'intent': question_type, 'entities': results}
    except:
        return Non