def METHOD_NAME(args):
    args = parse_args(args)
    with open(args.requirements_yaml_location) as f:
        requirements_yaml = yaml.load(f, Loader=yaml.SafeLoader)
    validate_requirements_yaml(requirements_yaml)
    requirements_txt_content = generate_requirements_txt_content(requirements_yaml)
    with open(args.requirements_txt_output_location, "w") as f:
        # Write requirements file content with a trailing newline
        f.write(AUTOGENERATED_HEADER + "\n")
        f.write(requirements_txt_content + "\n")