def METHOD_NAME(self, max=None, min=None):
    with self.mutex:
        if max is not None:
            if max < self.processes:
                self._shrink(self.processes - max)
            self._update_consumer_prefetch_count(max)
            self.max_concurrency = max
        if min is not None:
            if min > self.processes:
                self._grow(min - self.processes)
            self.min_concurrency = min
        return self.max_concurrency, self.min_concurrency