class FnApiDoFnRunner {

  public void processElementForPairWithRestriction(WindowedValue<InputT> elem) {
    currentElement = elem;
    try {
      Iterator<BoundedWindow> windowIterator =
          (Iterator<BoundedWindow>) elem.getWindows().iterator();
      while (windowIterator.hasNext()) {
        currentWindow = windowIterator.next();
        outputTo(
            mainOutputConsumers,
            (WindowedValue)
                elem.withValue(
                    KV.of(
                        elem.getValue(), doFnInvoker.invokeGetInitialRestriction(processContext))));
      }
    } finally {
      currentElement = null;
      currentWindow = null;
    }
  }

    FnApiDoFnRunner(Context<InputT, OutputT> context);

}