Computes the bilinear pairing e(p,q). @p must be a G1Element and @q must
    be a G2Element.
    @returns a GtElement

def pair(p,q):
    """
    Computes the bilinear pairing e(p,q). @p must be a G1Element and @q must
    be a G2Element.
    @returns a GtElement
    """
    # Check types
    assertType(p, G1Element)
    assertType(q, G2Element)

    result = GtElement()
    librelic.pc_map_abi(byref(result), byref(p), byref(q))
    return result