human
I wrote the below code

    argument.check_unexpected_kwargs(kwargs, train='train    argument    is    not    supported    anymore.    Use    chainer.using_config', use_cudnn='use_cudnn    argument    is    not    supported    anymore.    Use    chainer.using_config')
    argument.assert_kwargs_empty(kwargs)
    xp = cuda.get_array_module(hx, hx.data)
    if ((xp is not numpy) and chainer.should_use_cudnn('>=auto', 5000)):
        states = get_random_state().create_dropout_states(dropout_ratio)
        inputs = tuple(itertools.chain((hx, cx), itertools.chain.from_iterable(ws), itertools.chain.from_iterable(bs), xs))
        if use_bi_direction:
            rnn = NStepBiLSTM(n_layers, states)
        else:
            rnn = NStepLSTM(n_layers, states)
        ret = rnn(*inputs)
        (hy, cy) = ret[:2]
        ys = ret[2:]
        return (hy, cy, ys)
    else:
        direction = (2 if use_bi_direction else 1)
        split_size = (n_layers * direction)
        hx = split_axis.split_axis(hx, split_size, axis=0, force_tuple=True)
        hx = [reshape.reshape(h, h.shape[1:]) for h in hx]
        cx = split_axis.split_axis(cx, split_size, axis=0, force_tuple=True)
        cx = [reshape.reshape(c, c.shape[1:]) for c in cx]
        xws = [_stack_weight([w[2], w[0], w[1], w[3]]) for w in ws]
        hws = [_stack_weight([w[6], w[4], w[5], w[7]]) for w in ws]
        xbs = [_stack_weight([b[2], b[0], b[1], b[3]]) for b in bs]
        hbs = [_stack_weight([b[6], b[4], b[5], b[7]]) for b in bs]
        xs_next = xs
        hy = []
        cy = []
        for layer in six.moves.range(n_layers):
            def _one_directional_loop(di):
                h_list = []
                c_list = []
                layer_idx = ((direction * layer) + di)
                h = hx[layer_idx]
                c = cx[layer_idx]
                if (di == 0):
                    xs_list = xs_next
                else:
                    xs_list = reversed(xs_next)
                for x in xs_list:
                    batch = x.shape[0]
                   ...

What's a good function header?
assistant
#Here's a good function header.

def n_step_lstm_base(n_layers, dropout_ratio, hx, cx, ws, bs, xs, use_bi_direction, **kwargs):