<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dump_yaml(testcase, yaml_file):
 """ dump HAR entries to yaml testcase """

    logging.info("dump testcase to YAML format.")

    with io.open(yaml_file, 'w', encoding="utf-8") as outfile:
        yaml.dump(testcase, outfile, allow_unicode=True, default_flow_style=False, indent=4)

    logging.info("Generate YAML testcase successfully: {}".format(yaml_file))