def create_dictionary(all_groups, sub_keys):
    """
    Create nested dictionary - each group within a file and its properties.

    Parameters
    ----------
    all_groups : List, groups within .h5 file.
    sub_keys : List, keys for each group within .h5 file.

    Returns
    -------
    dictionary : Dictionary in format: {Group1: [key, Key ...], Group2: [Key, Key ...]}.

    """

    dictionary = {group: [key for key in sub_keys[i]] for i, group in enumerate(all_groups)}

    return dictionary