public static <M, OM> StreamOperatorSpec<M, OM> createFlatMapOperatorSpec(
      FlatMapFunction<? super M, ? extends OM> flatMapFn, String opId) {
    return new FlatMapOperatorSpec<>((FlatMapFunction<M, OM>) flatMapFn, opId);
  }
Creates a {@link StreamOperatorSpec} for {@link FlatMapFunction}.

@param flatMapFn  the transformation function
@param opId  the unique ID of the operator
@param <M>  type of input message
@param <OM>  type of output message
@return  the {@link StreamOperatorSpec}
samza-core/src/main/java/org/apache/samza/operators/spec/OperatorSpecs.java