def METHOD_NAME(waf_policy_obj):
    #add a rule to parse body as xml for requests with /broker/xml uri
    xml_rule = [
        {
            "index": 0,
            "name": "enforce XML parsing for /broker/xml",
            "description": "Clients often send the wrong Content-Type header. We ignore the header and enforce the request body to be parsed as XML in WAF",
            "rule": "SecRule REQUEST_METHOD \"@streq POST\" \"phase:1,id:4099822,t:none,nolog,pass,chain\" \n SecRule REQUEST_URI \"@streq /broker/xml\" \"t:none,ctl:requestBodyProcessor=XML\""
        }
    ]
    pre_crs_group = {
        "index": 0,
        "name": "VDI_409_ENFORCE_XML",
        "rules": xml_rule
    }
    index = 0
    if "pre_crs_groups" not in waf_policy_obj:
        waf_policy_obj["pre_crs_groups"] = list()
    for pre_crs in waf_policy_obj["pre_crs_groups"]:
        if pre_crs["name"] == "VDI_409_ENFORCE_XML":
            pre_crs["rules"] = xml_rule
            pre_crs["enable"] = True
            return
        if pre_crs["index"] > index:
            index = pre_crs["index"]
    pre_crs_group["index"] = index + 1
    waf_policy_obj["pre_crs_groups"].append(pre_crs_group)