code: public CompletableFuture<StackTraceSampleResponse> requestStackTraceSample(
  			int sampleId,
  			int numSamples,
  			Time delayBetweenSamples,
  			int maxStackTraceDepth,
  			Time timeout) {
  
  		final LogicalSlot slot = assignedResource;
  
  		if (slot != null) {
  			final TaskManagerGateway taskManagerGateway = slot.getTaskManagerGateway();
  
  			return taskManagerGateway.requestStackTraceSample(
  				attemptId,
  				sampleId,
  				numSamples,
  				delayBetweenSamples,
  				maxStackTraceDepth,
  				timeout);
  		} else {
  			return FutureUtils.completedExceptionally(new Exception("The execution has no slot assigned."));
  		}
  	}
docs: Request a stack trace sample from the task of this execution.
  
  @param sampleId of the stack trace sample
  @param numSamples the sample should contain
  @param delayBetweenSamples to wait
  @param maxStackTraceDepth of the samples
  @param timeout until the request times out
  @return Future stack trace sample response