class SoftAssertionsStatement {

  private SoftAssertionsProvider soft;
  private AssertionErrorCreator assertionErrorCreator = new AssertionErrorCreator();

  private SoftAssertionsStatement(SoftAssertionsProvider soft) {
    this.soft = soft;
  }

  public static Statement softAssertionsStatement(SoftAssertionsProvider softAssertions, final Statement baseStatement) {
    return new SoftAssertionsStatement(softAssertions).build(baseStatement);
  }

  private Statement build(final Statement baseStatement) {<FILL_FUNCTION_BODY>}
}

    // no lambda to keep java 6 compatibility
    return new Statement() {
      @Override
      public void evaluate() throws Throwable {
        baseStatement.evaluate();
        List<AssertionError> errors = soft.assertionErrorsCollected();
        if (errors.isEmpty()) return;
        // tests assertions raised some errors
        assertionErrorCreator.tryThrowingMultipleFailuresError(errors);
        // failed to throw MultipleFailuresError -> throw MultipleFailureException instead
        // This new ArrayList() is necessary due to the incompatible type signatures between
        // MultipleFailureException.assertEmpty() (takes a List<Throwable>) and errors
        // (which is a List<AssertionError>). Ideally assertEmpty() should have been a
        // List<? extends Throwable>.
        MultipleFailureException.assertEmpty(new ArrayList<>(errors));
      }
    };
  
<no_super_class>