code: def verify(self, public_pair, val, sig):
          
          order = self._order
          r, s = sig
          if r < 1 or r >= order or s < 1 or s >= order:
              return False
          s_inverse = self.inverse(s)
          u1 = val * s_inverse
          u2 = r * s_inverse
          point = u1 * self + u2 * self.Point(*public_pair)
          v = point[0] % order
          return v == r
docs: :param: public_pair: a :class:`Point <pycoin.ecdsa.Point.Point>` on the curve
          :param: val: an integer value
          :param: sig: a pair of integers ``(r, s)`` representing an ecdsa signature
  
          :returns: True if and only if the signature ``sig`` is a valid signature
              of ``val`` using ``public_pair`` public key.