def METHOD_NAME(do_view):
    sim.setup(timestep=1.0)
    sim.set_number_of_neurons_per_core(sim.IF_curr_exp, 5)
    pop_1 = sim.Population(N_NEURONS, sim.IF_curr_exp(), label="pop_1")
    input = sim.Population(N_NEURONS, sim.SpikeSourceArray(
        spike_times=[[0, 10, 20],
                     [1, 21],
                     [2, 12, 22],
                     [3, 13, 23],
                     [14],
                     [5, 15, 25],
                     [],
                     [17, 27],
                     [8, 18, 28]]),
        label="input")
    sim.Projection(input, pop_1, sim.OneToOneConnector(),
                   synapse_type=sim.StaticSynapse(weight=5, delay=1))
    if do_view:
        # packets-per-timestep not allowed on a view
        pop_1[1, 2].record(["spikes", "v"])
    else:
        pop_1.record(["spikes", "v", "packets-per-timestep"])
    simtime = 35
    sim.run(simtime)
    if not do_view:
        my_dir = os.path.dirname(os.path.abspath(__file__))
        neo = pop_1.get_data(
            variables=["spikes", "v",  "packets-per-timestep"])
        spikes = neo_convertor.convert_spikes(neo)
        print(spikes)
        my_spikes = os.path.join(my_dir, "spikes.csv")
        numpy.savetxt(my_spikes, spikes, delimiter=",")
        v = neo.segments[0].filter(name='v')[0]
        print(v)
        my_v = os.path.join(my_dir, "v.csv")
        numpy.savetxt(my_v, v, delimiter=",")
        packets = neo.segments[0].filter(name='packets-per-timestep')[0]
        print(packets)
        my_packets = os.path.join(my_dir, "packets-per-timestep.csv")
        numpy.savetxt(my_packets, packets, delimiter=",")
    sim.end()
    run_buffer = BaseDatabase.default_database_file()
    my_dir = os.path.dirname(os.path.abspath(__file__))
    if do_view:
        my_buffer = os.path.join(my_dir, "view_data.sqlite3")
    else:
        my_buffer = os.path.join(my_dir, "all_data.sqlite3")
    shutil.copyfile(run_buffer, my_buffer)