<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def open_consolidated(store, metadata_key='.zmetadata', mode='r+', **kwargs):
 """Open group using metadata previously consolidated into a single key. This is an optimised method for opening a Zarr group, where instead of traversing the group/array hierarchy by accessing the metadata keys at each level, a single key contains all of the metadata for everything. For remote data sources where the overhead of accessing a key is large compared to the time to read data. The group accessed must have already had its metadata consolidated into a single key using the function :func:`consolidate_metadata`. This optimised method only works in modes which do not change the metadata, although the data may still be written/updated. Parameters store : MutableMapping or string Store or path to directory in file system or name of zip file. metadata_key : str Key to read the consolidated metadata from. The default (.zmetadata) corresponds to the default used by :func:`consolidate_metadata`. mode : {'r', 'r+'}, optional Persistence mode: 'r' means read only (must exist); 'r+' means read/write (must exist) although only writes to data are allowed, changes to metadata including creation of new arrays or group are not allowed. **kwargs Additional parameters are passed through to :func:`zarr.creation.open_array` or :func:`zarr.hierarchy.open_group`. Returns ------- g : :class:`zarr.hierarchy.Group` Group instance, opened with the consolidated metadata. See Also -------- consolidate_metadata """


    from .storage import ConsolidatedMetadataStore

    # normalize parameters
    store = normalize_store_arg(store)
    if mode not in {'r', 'r+'}:
        raise ValueError("invalid mode, expected either 'r' or 'r+'; found {!r}"
                         .format(mode))

    # setup metadata sotre
    meta_store = ConsolidatedMetadataStore(store, metadata_key=metadata_key)

    # pass through
    return open(store=meta_store, chunk_store=store, mode=mode, **kwargs)