Prevent overwriting existing metadata?

    if name not in metadata:
        metadata[name] = ....