def METHOD_NAME(qs, _, value):
    if not value:
        return qs
    _, obj_pks = resolve_global_ids_to_primary_keys(value, "Order")
    pks = []
    old_pks = []
    for pk in obj_pks:
        try:
            pks.append(UUID(pk))
        except ValueError:
            old_pks.append(pk)
    return qs.filter(Q(id__in=pks) | (Q(use_old_id=True) & Q(number__in=old_pks)))