def check(self, request, consumer, token, signature):
        """
        Returns whether the given signature is the correct signature for
        the given consumer and token signing the given request.
        """
        built = self.sign(request, consumer, token)
        if isinstance(signature, STRING_TYPES):
            signature = signature.encode("utf8")
        return built == signature
def check ( self , request , consumer , token , signature ) : built = self . sign ( request , consumer , token ) if isinstance ( signature , STRING_TYPES ) : signature = signature . encode ( "utf8" ) return built == signature
Returns whether the given signature is the correct signature for
        the given consumer and token signing the given request.