def METHOD_NAME(
    a, theo_mean, theo_stdev, mean_tol=1e-2, stdev_tol=1.0
):
    if True:
        aa = np.array(a)
        average = np.mean(aa)
        stdev = np.std(aa)
    else:  # keeping this path for further investigation
        average = num.mean(a)
        stdev = num.sqrt(
            num.mean((a - average) ** 2)
        )  # num.std(a) -> does not work
    print(
        f"average = {average} - theoretical {theo_mean}"
        + f", stdev = {stdev} - theoretical {theo_stdev}\n"
    )
    assert abs(theo_mean - average) < mean_tol * max(1.0, abs(theo_mean))
    # the theoretical standard deviation can't be 0
    assert theo_stdev != 0
    # TODO: this check is not a good proxy to validating that the samples
    #       respect the assumed random distribution unless we draw
    #       extremely many samples. until we find a better validation
    #       method, we make the check lenient to avoid random
    #       failures in the CI. (we still need the check to catch
    #       the cases that are obviously wrong.)
    assert abs(theo_stdev - stdev) / min(theo_stdev, stdev) <= stdev_tol