def METHOD_NAME(*a):
    args = []
    kwargs = {}
    names = ["output", "inputs", "state"]
    flags = [named_out, named_in, named_state]
    for ai, name, flag in zip(a, names, flags):
        if flag:
            kwargs[name] = ai
        else:
            args.append(ai)
    return args, kwargs