def METHOD_NAME(attr, string, normalize=True):
    parts = string.split("*")
    if normalize:
        attr = "normalize-space(" + attr + ")"
    if len(parts) != 2:
        print("ERROR: This function is meant to support 1 wildcard")
        return "[" + attr + "=" + string + "]"
    else:
        pt1 = ""
        pt2 = ""
        if parts[0] != "":
            pt1 = "starts-with(" + attr + ", '" + parts[0] + "')"
        if parts[1] != "":
            pt2 = (
                "contains(substring("
                + attr
                + ", string-length("
                + attr
                + ")-"
                + str(len(parts[1]) - 1)
                + "), '"
                + parts[1]
                + "')"
            )
        if pt1 == "" and pt2 != "":
            return "[" + pt2 + "]"
        elif pt1 != "" and pt2 == "":
            return "[" + pt1 + "]"
        elif pt1 != "" and pt2 != "":
            return "[" + pt1 + " and " + pt2 + "]"
        else:
            print("ERROR: The string is empty")
            return "[" + attr + "=" + string + "]"