def METHOD_NAME(self, instance):
    if instance.display_name:
        return instance.display_name
    elif instance.first_name or instance.last_name:
        return f'{instance.first_name} {instance.last_name}'
    else:
        return instance.username