<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setting(self, opt, val):
 """change an arbitrary synth setting, type-smart"""

        opt = opt.encode()
        if isinstance(val, basestring):
            fluid_settings_setstr(self.settings, opt, val)
        elif isinstance(val, int):
            fluid_settings_setint(self.settings, opt, val)
        elif isinstance(val, float):
            fluid_settings_setnum(self.settings, opt, val)