def METHOD_NAME(source_dir, target_dir):
    template_name = "housing_counselor/pdf_selfcontained.html"
    template = loader.get_template(template_name)
    for zipcode, filename in get_counselor_json_files(source_dir):
        with open(filename, "r") as f:
            zipcode_data = json.loads(f.read())
        html = template.render(
            {
                "zipcode": zipcode,
                "zipcode_valid": True,
                "api_json": zipcode_data,
            }
        )
        html_filename = os.path.join(target_dir, "{}.html".format(zipcode))
        with open(html_filename, "w") as f:
            f.write(html)