code: private CompletionStage<List<Map<String, Result<R>>>> callSyncHelperNonBlock(
              final SaltClient client, Target<?> target, AuthMethod auth, Optional<Batch> batch) {
          Map<String, Object> customArgs = new HashMap<>();
          batch.ifPresent(v -> customArgs.putAll(v.getParams()));
  
          Client clientType = batch.isPresent() ? Client.LOCAL_BATCH : Client.LOCAL;
  
          Type xor = parameterizedType(null, Result.class, getReturnType().getType());
          Type map = parameterizedType(null, Map.class, String.class, xor);
          Type listType = parameterizedType(null, List.class, map);
          Type wrapperType = parameterizedType(null, Return.class, listType);
          TypeToken<Return<List<Map<String, Result<R>>>>> typeToken =
                  (TypeToken<Return<List<Map<String, Result<R>>>>>) TypeToken.get(wrapperType);
  
          if (batch.isPresent()) {
              return client.call(this,
                      clientType,
                      Optional.of(target),
                      customArgs,
                      typeToken,
                      auth)
                      .thenApply(Return::getResult)
                      .thenApply(results -> handleRetcodeBatchingHack(results, xor));
          } else {
              return client.call(this,
                      clientType,
                      Optional.of(target),
                      customArgs,
                      typeToken,
                      auth)
                      .thenApply(Return::getResult);
          }
      }
docs: Helper to call an execution module function on the given target for batched or
  unbatched while also providing an option to use the given credentials or to use a
  prior created token. Synchronously waits for the result.
  
  @param client SaltClient instance
  @param target the target for the function
  @param batch the batch parameter, empty for unbatched
  @param auth authentication credentials to use
  @return A list of maps with each list representing each batch, and maps containing
  the results with the minion names as keys. The first list is the entire
  output for unbatched input.