def METHOD_NAME(self, timeseries_group, type):
    queryset = models.Timeseries.objects.filter(
        timeseries_group=timeseries_group, type=type
    )
    if queryset.exists():
        with translation.override(None):
            type_str = str(dict(models.Timeseries.TIMESERIES_TYPES)[type])
        raise serializers.ValidationError(
            f"A time series with timeseries_group_id={timeseries_group.id} and "
            f"type={type_str} already exists"
        )