def get_config_value(config, field_names):
    """get value for a config entry

    :param config:
    :param field_names:

    """
    buf = {}
    for field in field_names:
        if field in config:
            buf[field] = config.get(field)
    if len(buf.items()) > 1:
        raise RuntimeError('More than one field alias is specified: {}'.
            format(buf))
    if len(buf.items()) > 0:
        return list(buf.items())[0]
    else:
        return None, None
