def get_meta_value(meta, *keys, default=None):
    """
    Return value from metadata.
    Given keys can define a path in the document tree.
    """
    try:
        for key in keys:
            if not meta:
                raise KeyError(key)
            meta = meta[key]
        return meta
    except KeyError:
        return default