def METHOD_NAME(self, name):
    owner = self.context["request"].user
    qs = Timeslot.objects.filter(user=owner, name=name)
    if not qs.exists():  # create
        return name
    instance = getattr(self, "instance", None)  # update
    if instance and qs.filter(pk=instance.pk).exists():
        return name
    raise serializers.ValidationError(
        f'The name "{name}" is already in use for a another timeslot owned by user {owner}.'
    )