def _unescape_key(string):
    """
    Unescape '__type' and '__meta' keys if they occur.
    """
    if string.startswith("__") and string.lstrip("_") in ("type", "meta"):
        return string[1:]
    return string