def combine_metagroups(list_meta_groups):
    """
    Function to combine multiple metagroups be renaming them.
    So they can be added into the database with different names.

    A `suffix` is appended going ``1 .. n_metagroups`` with a padding zero if needed.

    Parameters
    ----------
    list_meta_groups : List[dict]

    Returns
    -------
    combined_meta_groups : dict
        Renamed list of metagroups
    """
    combined_meta_groups = dict()

    n_runs = len(list_meta_groups)
    if n_runs == 0:
        return combined_meta_groups
    elif n_runs > 1:
        suffix_pattern = '{{:0{:d}d}}'.format(len(str(n_runs)))
        for i in range(n_runs):
            meta_groups = list_meta_groups[i]
            # add suffix_pattern at the end of the runs
            combined_meta_groups.update(dict((k+suffix_pattern.format(i+1),v) for k,v in meta_groups.items()))
    else:
        combined_meta_groups.update(list_meta_groups[0])
    return combined_meta_groups