def data_schema(cfg):
    """Given config data, return the Cerberus schema for the input data.
    """
    return {
        cfg['time_key']: {
            'type': cfg['time_type'],
            'required': True},
        'value': {
            'allowed': cfg['data_values'],
            'required': True}}