def get_context_types_value(context_id, source, filter_func, codebase):
    #print('In context types value')
    query = CodeElementLink.objects.filter(code_element__kind__is_type=True).\
            filter(index=0).\
            filter(code_element__codebase=codebase).\
            filter(code_reference__source=source)
    #print(query.count())
    query = filter_func(query, context_id)
    #print(query.count())

    context_types = []
    pk_set = set()

    for link in query.all():
        code_element = link.code_element
        if pk_set not in code_element.pk:
            context_types.append(code_element)
            pk_set.add(code_element.pk)

    return context_types
dataset/ETHPy150Open bartdag/recodoc2/recodoc2/apps/codebase/linker/context.py/get_context_types_value/swapped operands of `not in`