def METHOD_NAME(
    self, hexagon_session: Session, ref_data, in_shape, axis, keepdims, reduce_type, dtype
):
    """Test reduce map."""
    in_npy, in_npy_map, out_npy = ref_data
    # Build the logic and compile the function
    a_tensor = te.placeholder(shape=in_shape, name="a_tensor", dtype=dtype)
    a1_tensor = topi.sqrt(topi.exp(a_tensor))
    out_dtype = dtype
    if reduce_type == "sum":
        b_tensor = topi.sum(a1_tensor, axis=axis, keepdims=keepdims)
    elif reduce_type == "all":
        b_tensor = topi.all(a_tensor, axis=axis, keepdims=keepdims)
    elif reduce_type == "any":
        b_tensor = topi.any(a_tensor, axis=axis, keepdims=keepdims)
    elif reduce_type == "max":
        b_tensor = topi.max(a1_tensor, axis=axis, keepdims=keepdims)
    elif reduce_type == "min":
        b_tensor = topi.min(a1_tensor, axis=axis, keepdims=keepdims)
    elif reduce_type == "argmax":
        b_tensor = topi.argmax(a1_tensor, axis=axis, keepdims=keepdims)
        out_dtype = "int32"
    elif reduce_type == "argmin":
        b_tensor = topi.argmin(a1_tensor, axis=axis, keepdims=keepdims)
        out_dtype = "int32"
    else:
        raise NotImplementedError
    with tvm.target.Target(get_hexagon_target("v68")):
        fschedule = topi.hexagon.schedule_reduce
        s = fschedule(b_tensor)
    func = tvm.build(s, [a_tensor, b_tensor], get_hexagon_target("v68"), name=reduce_type)
    mod = hexagon_session.load_module(func)
    dev = hexagon_session.device
    data_tvm = tvm.nd.array(in_npy, device=dev)
    out_tvm = tvm.nd.empty(shape=out_npy.shape, device=dev, dtype=out_dtype)
    mod[reduce_type](data_tvm, out_tvm)
    if reduce_type in ["argmax", "argmin"]:
        out_tvm_indices = out_tvm.numpy()
        if keepdims:
            out_tvm_indices = np.take(out_tvm_indices, indices=0, axis=axis)
        if axis is None:
            out_tvm_val = in_npy_map.ravel()[out_tvm_indices]
        else:
            other_indices = tuple(np.indices(in_shape[0:axis] + in_shape[(axis + 1) :]))
            sel_indices = other_indices[0:axis] + (out_tvm_indices,) + other_indices[axis:]
            out_tvm_val = in_npy_map[sel_indices]
        if reduce_type == "argmax":
            tvm.testing.assert_allclose(out_tvm_val, in_npy_map.max(axis=axis), 1e-3, 1e-3)
        elif reduce_type == "argmin":
            tvm.testing.assert_allclose(out_tvm_val, in_npy_map.min(axis=axis), 1e-3, 1e-3)
    else:
        tvm.testing.assert_allclose(out_tvm.numpy(), out_npy, 1e-3, 1e-3)