':return: Condition function that require that the given value for
``"key"`` not be present in any dataset\'s metadata.'

def unique_key(self, key):

    def condition(datasets_config):
        for dataset in datasets_config:
            if (dataset.metadata.get('key') == key):
                raise CustomException()
    return condition
