'Retrieve a value from a etcd key.'

def client_read(self, path, **kwargs):

    try:
        res = self.client.read(path, timeout=kwargs.get('timeout', DEFAULT_TIMEOUT), recursive=(kwargs.get('recursive') or kwargs.get('all', False)))
        if kwargs.get('watch', False):
            modified_indices = ((res.modifiedIndex,) + tuple((leaf.modifiedIndex for leaf in res.leaves)))
            return max(modified_indices)
        else:
            return res.value
    except EtcdKeyNotFound:
        raise KeyNotFound(('The    key    %s    was    not    found    in    etcd' % path))
    except TimeoutError as e:
        raise e
