def METHOD_NAME(
    self,
    dtype,
    input_shape,
    input_layout,
    transformed_input_np,
    expected_output_np,
    quantize_expected_output_np,
    hexagon_session,
):
    a_tensor = te.placeholder(input_shape, name="a_tensor", dtype=dtype)
    if dtype == "float16":
        m_tensor = sl.global_avg_pool2d(a_tensor)
        tir_schedule = sl.stir_global_avg_pool2d_schedule(m_tensor, a_tensor, input_layout)
    elif dtype in ["uint8", "int8"]:
        m_tensor = qn.global_avg_pool2d_u8(
            a_tensor,
            dtype,
            ZERO_POINT_VAL,
            SCALE_VAL,
            ZERO_POINT_M_VAL,
            SCALE_M_VAL,
        )
        tir_schedule = qn.stir_global_avg_pool2d_u8_schedule(m_tensor, a_tensor, input_layout)
    sch = tir_schedule.mod
    with tvm.transform.PassContext(opt_level=3):
        func = tvm.build(
            sch,
            [a_tensor, m_tensor],
            get_hexagon_target("v69"),
            name="global_pool2d",
        )
    input_axis_separator = [4]
    a_data_nd = allocate_hexagon_array(
        hexagon_session.device,
        data=transformed_input_np,
        dtype=dtype,
        axis_separators=input_axis_separator,
        mem_scope="global.vtcm",
    )
    m_data_nd = allocate_hexagon_array(
        hexagon_session.device,
        expected_output_np.shape,
        dtype=dtype,
    )
    mod = hexagon_session.load_module(func)
    mod(a_data_nd, m_data_nd)
    # Convert nd to np
    m_data_np = m_data_nd.numpy()
    if dtype == "float16":
        np.testing.assert_allclose(expected_output_np, m_data_np, rtol=1e-3, atol=1e-3)
    elif dtype in ["int8", "uint8"]:
        np.testing.assert_allclose(quantize_expected_output_np, m_data_np, atol=1)