code: def verify(s, sig, pk, sig_format=SER_COMPACT, pk_format=SER_COMPACT,
             curve=None):
      
      if isinstance(s, six.text_type):
          raise ValueError("Encode `s` to a bytestring yourself to" +
                           " prevent problems with different default encodings")
      curve = (Curve.by_pk_len(len(pk)) if curve is None
               else Curve.by_name(curve))
      p = curve.pubkey_from_string(pk, pk_format)
      return p.verify(hashlib.sha512(s).digest(), sig, sig_format)
docs: Verifies that `sig' is a signature of pubkey `pk' for the
          message `s'.