code: def sign(self, request, consumer, token):
          
          key, raw = self.signing_base(request, consumer, token)
  
          hashed = hmac.new(key, raw, sha1)
  
          # Calculate the digest base 64.
          return binascii.b2a_base64(hashed.digest())[:-1]
docs: Builds the base signature string.