def metadata_key(config):
    """
    Build a key to a file in the 'metadata' directory of the published dataset.
    """

    def func(filename) -> str:
        return f"{config.s3_publish_key}/metadata/{filename}"

    return func