<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_preset(self):
 """ Loads preset if it is specified in the .frigg.yml """

        if 'preset' in self.settings.preview:
            with open(os.path.join(os.path.dirname(__file__), 'presets.yaml')) as f:
                presets = yaml.load(f.read())

            if self.settings.preview['preset'] in presets:
                self.preset = presets[self.settings.preview['preset']]
            return self.preset