def _add_wildcard_config(self):
        """Adds config data about the wildcard functions"""
        for idx, pair in enumerate(self._traj._wildcard_functions.items()):
            wildcards, wc_function = pair
            for jdx, wildcard in enumerate(wildcards):
                config_name = ('environment.%s.wildcards.function_%d.wildcard_%d' %
                                (self.name, idx, jdx))
                if not self._traj.f_contains('config.' + config_name):
                    self._traj.f_add_config(Parameter, config_name, wildcard,
                                    comment='Wildcard symbol for the wildcard function').f_lock()
            if hasattr(wc_function, '__name__'):
                config_name = ('environment.%s.wildcards.function_%d.name' %
                                (self.name, idx))
                if not self._traj.f_contains('config.' + config_name):
                    self._traj.f_add_config(Parameter, config_name, wc_function.__name__,
                                    comment='Nme of wildcard function').f_lock()
            if wc_function.__doc__:
                config_name = ('environment.%s.wildcards.function_%d.doc' %
                                (self.name, idx))
                if not self._traj.f_contains('config.' + config_name):
                    self._traj.f_add_config(Parameter, config_name, wc_function.__doc__,
                                    comment='Docstring of wildcard function').f_lock()
            try:
                source = inspect.getsource(wc_function)
                config_name = ('environment.%s.wildcards.function_%d.source' %
                            (self.name, idx))
                if not self._traj.f_contains('config.' + config_name):
                    self._traj.f_add_config(Parameter, config_name, source,
                                comment='Source code of wildcard function').f_lock()
            except Exception:
                pass  # We cannot find the source, just leave it
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/environment.py/Environment._add_wildcard_config/original