def METHOD_NAME(lroe_operation):
    def set_default_headers(headers):
        headers["Accept-Encoding"] = "gzip"
        headers["Content-Encoding"] = "gzip"
        headers["Content-Length"] = 0
        headers["Content-Type"] = "application/octet-stream"
    def set_eus_bizkaia_n3_headers(headers):
        def set_eus_bizkaia_n3_data():
            if hasattr(lroe_operation, "lroe_chapter_id"):
                apa = (
                    lroe_operation.lroe_subchapter_id.code
                    or lroe_operation.lroe_chapter_id.code
                )
            else:
                apa = "1.1"
            partner = lroe_operation.company_id.partner_id
            nif = partner.tbai_get_value_nif()
            n3_dat_dict = {
                "con": "LROE",
                "apa": apa,
                "inte": {"nif": nif, "nrs": lroe_operation.company_id.name},
                "drs": {
                    "mode": lroe_operation.model,
                    "ejer": lroe_operation.build_cabecera_ejercicio(),
                },
            }
            return json.dumps(n3_dat_dict)
        headers["eus-bizkaia-n3-version"] = "1.0"
        headers["eus-bizkaia-n3-content-type"] = "application/xml"
        headers["eus-bizkaia-n3-data"] = set_eus_bizkaia_n3_data()
    headers = {}
    set_default_headers(headers)
    set_eus_bizkaia_n3_headers(headers)
    return headers