def METHOD_NAME(qubits, ground, first, gap, dt, T):
    """Get the first two eigenvalues and the gap energy
    Args:
        qubits (int): # of total qubits in the instance.
        ground (list): ground state energy during the evolution.
        first (list): first excited state during the evolution.
        gap (list): gap energy during the evolution.
        T (float): Final time for the schedue.
        dt (float): time interval for the evolution.
    Returns:
        {}_qubits_energy.png: energy evolution of the ground and first excited state.
        {}_qubits_gap_energy.png: gap evolution during the adiabatic process.
    """
    fig, ax = plt.subplots()
    times = np.arange(0, T + dt, dt)
    ax.METHOD_NAME(times, ground, label="ground state", color="C0")
    ax.METHOD_NAME(times, first, label="first excited state", color="C1")
    plt.ylabel("energy")
    plt.xlabel("schedule")
    plt.title("Energy during adiabatic evolution")
    ax.legend()
    fig.tight_layout()
    fig.savefig("{}_qubits_energy.png".format(qubits), dpi=300, bbox_inches="tight")
    fig, ax = plt.subplots()
    ax.METHOD_NAME(times, gap, label="gap energy", color="C0")
    plt.ylabel("energy")
    plt.xlabel("schedule")
    plt.title("Energy during adiabatic evolution")
    ax.legend()
    fig.tight_layout()
    fig.savefig("{}_qubits_gap.png".format(qubits), dpi=300, bbox_inches="tight")