def METHOD_NAME(levels):
    """Add related fields and filter to active users only"""
    return levels.select_related(
        "owner__user", "owner__teacher", "owner__student"
    ).filter(owner__user__is_active=True)