def _get_submeta_by_key(self, metadata, key):
        if key in metadata:
            return (True, metadata[key])

        temp = deepcopy(metadata)
        if '_self' in temp:
            del temp['_self']
        meta_key = temp.keys()[0]
        if meta_key.startswith("$"):
            return (False, metadata[meta_key])

        raise KeyError("'%s' is invalid in metadata '%s'!" % (key, metadata))
Get submetadata dictionary.
dataset/ETHPy150Open openstack/compass-core/compass/deployment/installers/installer.py/BaseInstaller._get_submeta_by_key