def METHOD_NAME(
    size,
    name,
    statistic,
    distribution,
    data_type,
    X_y_regression,
):
    X, y = X_y_regression
    # set this to avoid flaky tests. This is primarily because when we have smaller samples,
    # once we remove values outside 3 st.devs, the distribution can begin to look more normal
    random_state = 2
    target_dist_check = TargetDistributionDataCheck()
    if distribution == "normal":
        y = norm.rvs(loc=3, size=size, random_state=random_state)
    elif distribution == "lognormal":
        y = lognorm.rvs(0.4, size=size, random_state=random_state)
    else:
        # Will have a p-value of 0 thereby rejecting the null hypothesis even after log transforming
        # This is essentially just checking the = of the statistic's "log.pvalue >= og.pvalue"
        y = lognorm.rvs(s=1, loc=1, scale=1, size=size, random_state=random_state)
    y = np.round(y, 6)
    if data_type == "negative":
        y = -np.abs(y)
    elif data_type == "mixed":
        y = y - 1.2
    if distribution == "normal":
        assert target_dist_check.validate(X, y) == []
    else:
        target_dist_ = target_dist_check.validate(X, y)
        if any(y <= 0):
            y = y + abs(y.min()) + 1
        y = y[y < (y.mean() + 3 * round(y.std(), 3))]
        test_og = statistic(y)
        details = {
            "normalization_method": name,
            "statistic": round(test_og.statistic, 1),
            "p-value": round(test_og.pvalue, 3),
        }
        assert target_dist_ == [
            DataCheckWarning(
                message="Target may have a lognormal distribution.",
                data_check_name=target_dist_check_name,
                message_code=DataCheckMessageCode.TARGET_LOGNORMAL_DISTRIBUTION,
                details=details,
                action_options=[
                    DataCheckActionOption(
                        DataCheckActionCode.TRANSFORM_TARGET,
                        data_check_name=target_dist_check_name,
                        metadata={
                            "is_target": True,
                            "transformation_strategy": "lognormal",
                        },
                    ),
                ],
            ).to_dict(),
        ]