def merge_gdf(model_params, raw_label='<STR_LIT>', file_type='<STR_LIT>',<EOL>fileprefix='<STR_LIT>'):
def get_raw_gids(model_params):<EOL><INDENT>'''<STR_LIT>'''<EOL>gidfile = open(os.path.join(model_params.raw_nest_output_path,<EOL>model_params.GID_filename),'<STR_LIT:r>') <EOL>gids = [] <EOL>for l in gidfile :<EOL><INDENT>a = l.split()<EOL>gids.append([int(a[<NUM_LIT:0>]),int(a[<NUM_LIT:1>])])<EOL><DEDENT>return gids<EOL><DEDENT>raw_gids = get_raw_gids(model_params)<EOL>pop_sizes = [raw_gids[i][<NUM_LIT:1>]-raw_gids[i][<NUM_LIT:0>]+<NUM_LIT:1><EOL>for i in np.arange(model_params.Npops)]<EOL>raw_first_gids =  [raw_gids[i][<NUM_LIT:0>] for i in np.arange(model_params.Npops)]<EOL>converted_first_gids = [int(<NUM_LIT:1> + np.sum(pop_sizes[:i]))<EOL>for i in np.arange(model_params.Npops)]<EOL>for pop_idx in np.arange(model_params.Npops):<EOL><INDENT>if pop_idx % SIZE == RANK:<EOL><INDENT>files = glob(os.path.join(model_params.raw_nest_output_path,<EOL>raw_label + str(pop_idx) +<EOL>'<STR_LIT>' + file_type))<EOL>gdf = [] <EOL>for f in files:<EOL><INDENT>new_gdf = helpers.read_gdf(f)<EOL>for line in new_gdf:<EOL><INDENT>line[<NUM_LIT:0>] = line[<NUM_LIT:0>] - raw_first_gids[pop_idx] +converted_first_gids[pop_idx]<EOL>gdf.append(line)<EOL><DEDENT><DEDENT>print('<STR_LIT>' % os.path.join(model_params.spike_output_path,<EOL>fileprefix +<EOL>'<STR_LIT>' % model_params.X[pop_idx]))<EOL>helpers.write_gdf(gdf, os.path.join(model_params.spike_output_path,<EOL>fileprefix +<EOL>'<STR_LIT>' % model_params.X[pop_idx]))<EOL><DEDENT><DEDENT>COMM.Barrier()<EOL>return<EOL>
NEST produces one file per virtual process containing recorder output. 
This function gathers and combines them into one single file per 
network population.

Parameters
----------
model_params : object
    network parameters object

Returns
-------
None