def get_query(self, request, term):
        # original code from selectable.base.ModelLookup.get_query:
        qs = self.get_queryset()
        if term:
            search_filters = []
            if self.search_fields:
                for field in self.search_fields:
                    search_filters.append(Q(**{field: term}))

            # tokenizing part
            tokens = re.split('\s+', term)
            if len(tokens) == 2:
                name1, name2 = tokens
                complex_q = (
                    Q(personal__icontains=name1) & Q(family__icontains=name2)
                ) | (
                    Q(personal__icontains=name2) & Q(family__icontains=name1)
                )
                search_filters.append(complex_q)

            # this is brilliant: it applies OR to all search filters
            qs = qs.filter(reduce(operator.or_, search_filters))

        return qs
Returns the token_key name for the oauth provider
dataset/ETHPy150Open swcarpentry/amy/workshops/lookups.py/PersonLookup.get_query--crossover with--dataset/ETHPy150Open dpgaspar/Flask-AppBuilder/flask_appbuilder/security/manager.py/BaseSecurityManager.get_oauth_token_key_name