code: def set_core_connections_per_host(self, host_distance, core_connections):
          
          if self.protocol_version >= 3:
              raise UnsupportedOperation(
                  "Cluster.set_core_connections_per_host() only has an effect "
                  "when using protocol_version 1 or 2.")
          old = self._core_connections_per_host[host_distance]
          self._core_connections_per_host[host_distance] = core_connections
          if old < core_connections:
              self._ensure_core_connections()
docs: Sets the minimum number of connections per Session that will be opened
          for each host with :class:`~.HostDistance` equal to `host_distance`.
          The default is 2 for :attr:`~HostDistance.LOCAL` and 1 for
          :attr:`~HostDistance.REMOTE`.
  
          Protocol version 1 and 2 are limited in the number of concurrent
          requests they can send per connection. The driver implements connection
          pooling to support higher levels of concurrency.
  
          If :attr:`~.Cluster.protocol_version` is set to 3 or higher, this
          is not supported (there is always one connection per host, unless
          the host is remote and :attr:`connect_to_remote_hosts` is :const:`False`)
          and using this will result in an :exc:`~.UnsupporteOperation`.