code: def set_max_threads(self, max_threads):
          
          if max_threads is None:
              raise TypeError('max_threads must not be None.')
          self._check_if_ready()
          self.collection.set_max_working(max_threads)
docs: Set the maximum number of concurrent threads.
  
          :type  max_threads: int
          :param max_threads: The number of threads.