<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_yaml_file(filename, contents):
 """Creates a yaml file with the given content."""

    with open(filename, 'w') as file:
        file.write(yaml.dump(contents, default_flow_style=False))