def METHOD_NAME(rules):
    for idx in range(len(rules)):
        if rules[idx].get("Statement", {}).get("ByteMatchStatement", {}).get("SearchString"):
            rules[idx]["Statement"]["ByteMatchStatement"]["SearchString"] = (
                rules[idx].get("Statement").get("ByteMatchStatement").get("SearchString").decode("utf-8")
            )
        else:
            for statement in ["AndStatement", "OrStatement", "NotStatement"]:
                if rules[idx].get("Statement", {}).get(statement):
                    rules[idx] = nested_byte_values_to_strings(rules[idx], statement)
    return rules