static Object normalizeResult(Object result) {
        logger.trace("normalizeResult {}", result);
        // this is to normalize types returned by external functions
        if (result != null && result.getClass().isArray()) {
            List<Object> objs = new ArrayList<>();
            for (int i = 0; i < Array.getLength(result); i++) {
                objs.add(NumberEvalHelper.coerceNumber(Array.get(result, i)));
            }
            return objs;
        } else {
            return NumberEvalHelper.coerceNumber(result);
        }
    }
@Test
    void normalizeResult() {
        List<Object> originalResult = List.of(3, "4", 56);
        Object result = originalResult.toArray();
        Object retrieved = BaseFEELFunctionHelper.normalizeResult(result);
        assertNotNull(retrieved);
        assertInstanceOf(List.class, retrieved);
        List<Object> retrievedList = (List<Object>) retrieved;
        assertEquals(originalResult.size(), retrievedList.size());
        for (int i = 0; i < originalResult.size(); i++) {
            assertEquals(NumberEvalHelper.coerceNumber(originalResult.get(i)), retrievedList.get(i));
        }

        result = 23;
        retrieved = BaseFEELFunctionHelper.normalizeResult(result);
        assertNotNull(retrieved);
        assertEquals(NumberEvalHelper.coerceNumber(result), retrieved);

        result = "23";
        retrieved = BaseFEELFunctionHelper.normalizeResult(result);
        assertNotNull(retrieved);
        assertEquals(NumberEvalHelper.coerceNumber(result), retrieved);
    }