<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_val(self, direct, section, val):
 """ set the config values """

        if val is not None:
            self.config.set(direct, section, val)
            self.update()