def AddConfigVar(name, doc, configparam, root=config, in_c_key=True):
    """Add a new variable to theano.config

    :type name: string for form "[section0.[section1.[etc]]].option"
    :param name: the full name for this configuration variable.

    :type doc: string
    :param doc: What does this variable specify?

    :type configparam: ConfigParam instance
    :param configparam: an object for getting and setting this configuration
        parameter

    :type root: object
    :param root: used for recursive calls -- do not provide an argument for
        this parameter.

    :type in_c_key: boolean
    :param in_c_key: If True, then whenever this config option changes, the
    key associated to compiled C modules also changes, i.e. it may trigger a
    compilation of these modules (this compilation will only be partial if it
    turns out that the generated C code is unchanged). Set this option to False
    only if you are confident this option should not affect C code compilation.

    :returns: None
    """

    # This method also performs some of the work of initializing ConfigParam
    # instances

    if root is config:
        # only set the name in the first call, not the recursive ones
        configparam.fullname = name
    sections = name.split('.')
    if len(sections) > 1:
        # set up a subobject
        if not hasattr(root, sections[0]):
            # every internal node in the config tree is an instance of its own
            # unique class
            class SubObj(object):
                _i_am_a_config_class = True
            setattr(root.__class__, sections[0], SubObj())
        newroot = getattr(root, sections[0])
        if (not getattr(newroot, '_i_am_a_config_class', False) or
                isinstance(newroot, type)):
            raise TypeError(
                'Internal config nodes must be config class instances',
                newroot)
        return AddConfigVar('.'.join(sections[1:]), doc, configparam,
                            root=newroot, in_c_key=in_c_key)
    else:
        if hasattr(root, name):
            raise AttributeError('This name is already taken',
                                 configparam.fullname)
        configparam.doc = doc
        configparam.in_c_key = in_c_key
        # Trigger a read of the value from config files and env vars
        # This allow to filter wrong value from the user.
        if not callable(configparam.default):
            configparam.__get__(root, type(root), delete_key=True)
        else:
            # We do not want to evaluate now the default value
            # when it is a callable.
            try:
                fetch_val_for_key(configparam.fullname)
                # The user provided a value, filter it now.
                configparam.__get__(root, type(root), delete_key=True)
            except __HOLE__:
                pass
        setattr(root.__class__, sections[0], configparam)
        _config_var_list.append(configparam)
dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/configparser.py/AddConfigVar