def get_or_insert(etcd_cl, key, value, **kwargs):
    """
    Performs atomic insert for a value if and only if it does not exists.
    If the value exists, no insert/update is performed.
    No exception is raised if value already exists.

    :param etcd_cl:
    :param key:
    :param value:
    :param kwargs:
    :return: None
    """
    try:
        etcd_cl.write(key, value, prevExist=False, **kwargs)
        return value
    except KeyError:
        # Ignore existing key.
        return etcd_cl.read(key, prevExist=True).value