def ref(name: str, value=None, _store={}):
    """
    A simple YAML like reference utility.
    It to easily store a value under a given key and return it.

    :param name: name of the reference
    :param value: new value of the reference (if value isn't None)
    :param _store: dict to store everything in
    :return: the value of the reference
    """
    if value is not None:
        _store[name] = value
    return _store[name]
