code: public <R> SingleOutputStreamOperator<R> flatSelect(final PatternFlatSelectFunction<T, R> patternFlatSelectFunction) {
  		// we have to extract the output type from the provided pattern selection function manually
  		// because the TypeExtractor cannot do that if the method is wrapped in a MapFunction
  
  		final TypeInformation<R> outTypeInfo = TypeExtractor.getUnaryOperatorReturnType(
  			patternFlatSelectFunction,
  			PatternFlatSelectFunction.class,
  			0,
  			1,
  			new int[]{1, 0},
  			builder.getInputType(),
  			null,
  			false);
  
  		return flatSelect(patternFlatSelectFunction, outTypeInfo);
  	}
docs: Applies a flat select function to the detected pattern sequence. For each pattern sequence
  the provided {@link PatternFlatSelectFunction} is called. The pattern flat select function
  can produce an arbitrary number of resulting elements.
  
  @param patternFlatSelectFunction The pattern flat select function which is called for each
  detected pattern sequence.
  @param <R> Type of the resulting elements
  @return {@link DataStream} which contains the resulting elements from the pattern flat select
  function.