def METHOD_NAME(self, query_obj):
    # clean input
    query_string = super(Proximate, self).METHOD_NAME(query_obj)
    if query_string != "":
        # match phrase with minimal word movements
        proximity = self.kwargs.get("proximity", 5)
        parts = query_string.split(" ")
        if len(parts) > 1:
            output = '"{}"~{}'.format(query_string, proximity)
        else:
            output = parts[0]
        if "boost" in self.kwargs:
            output = "{}^{}".format(output, self.kwargs["boost"])
        # increase score for any individual term
        if self.kwargs.get("any") and len(parts) > 1:
            words = list(self.query_words(*parts))
            if words:
                output = " OR ".join([output, *words])
    else:
        output = query_string
    return output