def METHOD_NAME(max_token_id, self_loop_penalty=-3):
    num_states = max_token_id + 1
    final_state = num_states
    arcs = ""
    for i in range(num_states):
        for j in range(1, num_states):
            if i == j:
                arcs += f"{i} {i} {i} 0 {self_loop_penalty}\n"
            else:
                arcs += f"{i} {j} {j} {j} 0.0\n"
        arcs += f"{i} {final_state} -1 -1 0.0\n"
    arcs += f"{final_state}"
    ans = k2.Fsa.from_str(arcs, num_aux_labels=1)
    ans = k2.arc_sort(ans)
    return ans