docs: public static ResultPartitionDeploymentDescriptor from(
  			IntermediateResultPartition partition, int maxParallelism, boolean lazyScheduling) {
  
  		final IntermediateDataSetID resultId = partition.getIntermediateResult().getId();
  		final IntermediateResultPartitionID partitionId = partition.getPartitionId();
  		final ResultPartitionType partitionType = partition.getIntermediateResult().getResultType();
  
  		// The produced data is partitioned among a number of subpartitions.
  		//
  		// If no consumers are known at this point, we use a single subpartition, otherwise we have
  		// one for each consuming sub task.
  		int numberOfSubpartitions = 1;
  
  		if (!partition.getConsumers().isEmpty() && !partition.getConsumers().get(0).isEmpty()) {
  
  			if (partition.getConsumers().size() > 1) {
  				throw new IllegalStateException("Currently, only a single consumer group per partition is supported.");
  			}
  
  			numberOfSubpartitions = partition.getConsumers().get(0).size();
  		}
  
  		return new ResultPartitionDeploymentDescriptor(
  				resultId, partitionId, partitionType, numberOfSubpartitions, maxParallelism, lazyScheduling);
  	}