def process_runs(mv_districts, n_of_districts, output_info, run_id, base_path):
    '''Runs a process organized by parallel_run()

    The function take all districts mv_districts and divide them into clusters
    of n_of_districts each. For each cluster, ding0 is run and the resulting
    network is saved as a pickle

    Parameters
    ----------
    mv_districts: list of int
        List with all districts to be run.
    n_of_districts: int
        Number of districts in a cluster
    output_info:
        Info about how the run went
    run_id: str
        Identifier for a run of Ding0. For example it is used to create a
        subdirectory of os.path.join(`base_path`, 'results')
    base_path : str
        Base path for ding0 data (input, results and logs).
        Default is `None` which sets it to :code:`~/.ding0` (may deviate on
        windows systems).
        Specify your own but keep in mind that it a required a particular
        structure of subdirectories.

    See Also
    --------
    parallel_run

    '''
    #######################################################################
    # database connection/ session
    engine = db.connection(section='oedb')
    session = sessionmaker(bind=engine)()

    #############################
    clusters = [mv_districts[x:x + n_of_districts] for x in range(0, len(mv_districts), n_of_districts)]
    output_clusters= []

    for cl in clusters:
        print('\n########################################')
        print('  Running ding0 for district', cl)
        print('########################################')

        nw_name = 'ding0_grids_' + str(cl[0])
        if not cl[0] == cl[-1]:
            nw_name = nw_name+'_to_'+str(cl[-1])
        nw = NetworkDing0(name=nw_name)
        try:
            msg = nw.run_ding0(session=session, mv_grid_districts_no=cl)
            if msg:
                status = 'run error'
            else:
                msg = ''
                status = 'OK'
                results.save_nd_to_pickle(nw, os.path.join(base_path, run_id))
            output_clusters.append((nw_name,status,msg, nw.metadata))
        except Exception as e:
            output_clusters.append((nw_name,  'corrupt dist', e, nw.metadata))
            continue

    output_info.put(output_clusters)
Runs a process organized by parallel_run()

    The function take all districts mv_districts and divide them into clusters
    of n_of_districts each. For each cluster, ding0 is run and the resulting
    network is saved as a pickle

    Parameters
    ----------
    mv_districts: list of int
        List with all districts to be run.
    n_of_districts: int
        Number of districts in a cluster
    output_info:
        Info about how the run went
    run_id: str
        Identifier for a run of Ding0. For example it is used to create a
        subdirectory of os.path.join(`base_path`, 'results')
    base_path : str
        Base path for ding0 data (input, results and logs).
        Default is `None` which sets it to :code:`~/.ding0` (may deviate on
        windows systems).
        Specify your own but keep in mind that it a required a particular
        structure of subdirectories.

    See Also
    --------
    parallel_run