def METHOD_NAME(*args):
    # Separate the received arguments into their respective (seq, outputs
    # from previous iterations, nonseqs) categories
    i_sequences = list(args[: len(o_sequences)])
    i_prev_outputs = list(args[len(o_sequences) : -len(o_nonsequences)])
    i_non_sequences = list(args[-len(o_nonsequences) :])
    i_outputs_infos = i_prev_outputs + [
        None,
    ] * len(new_nitsots)
    # Call the user-provided function with the proper arguments
    results, updates = scan(
        fn=fn,
        sequences=i_sequences[:-1],
        outputs_info=i_outputs_infos,
        non_sequences=i_non_sequences,
        name=name + "_inner",
        n_steps=i_sequences[-1],
    )
    if not isinstance(results, list):
        results = [results]
    # Keep only the last timestep of every output but keep all the updates
    if not isinstance(results, list):
        return results[-1], updates
    else:
        return [r[-1] for r in results], updates