def METHOD_NAME(n0, shape, dt, axis, outtype):
    range_lower = 0
    # range 1-3 for ints, avoid zeros for correct testing in prod case
    if np.issubdtype(dt, np.integer):
        range_lower = 1
    if dt == np.complex64:
        A = (
            (3 * np.random.random(shape) + range_lower)
            + (3 * np.random.random(shape) + range_lower) * 1j
        ).astype(np.complex64)
    elif dt == np.complex128:
        A = (
            (3 * np.random.random(shape) + range_lower)
            + (3 * np.random.random(shape) + range_lower) * 1j
        ).astype(np.complex128)
    else:
        A = (3 * np.random.random(shape) + range_lower).astype(dt)
    if n0 == "first_half":
        # second element along all axes is a NAN
        A[(1,) * len(shape)] = np.nan
    elif n0 == "second_half":
        # second from last element along all axes is a NAN
        A[
            tuple(map(lambda i, j: i - j, A.shape, (2,) * len(A.shape)))
        ] = np.nan
    if outtype is None:
        B = None
        C = None
    else:
        if axis is None:
            B = np.zeros(shape=A.size, dtype=outtype)
            C = np.zeros(shape=A.size, dtype=outtype)
        else:
            B = np.zeros(shape=shape, dtype=outtype)
            C = np.zeros(shape=shape, dtype=outtype)
    return A, B, C