<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def save(cls, filename, config):
 """ Save configuration to yaml file. """

        mode = os.O_WRONLY | os.O_TRUNC | os.O_CREAT
        with os.fdopen(os.open(filename, mode, 0o600), 'w') as fname:
            yaml.safe_dump(config, fname, indent=4, default_flow_style=False)